Skip to content

Commit e0e83c1

Browse files
committed
Fixed in range calculation with remaining distance.
1 parent f61b6eb commit e0e83c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Assets/JCSUnity/Scripts/Actions/3D/AI/JCS_3DWalkAction.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,11 +219,11 @@ public bool InRangeDistance()
219219
switch (mWalkType)
220220
{
221221
case JCS_3DWalkType.SELF_IN_DISTANCE:
222-
maxDistance = mSelfDistance + mMaxOffDistance;
222+
maxDistance = mSelfDistance + mMaxOffDistance + mAcceptRemainDistance;
223223
break;
224224
case JCS_3DWalkType.TARGET_CLOSEST_POINT:
225225
case JCS_3DWalkType.TARGET_IN_RANGE:
226-
maxDistance = mRangeDistance + mAdjustRangeDistance + mMaxOffDistance;
226+
maxDistance = mRangeDistance + mAdjustRangeDistance + mMaxOffDistance + mAcceptRemainDistance;
227227
break;
228228
}
229229

0 commit comments

Comments
 (0)