Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: fixed the distance calculation in TargetAreaFriend.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Mar 31, 2023
1 parent 7d8ab88 commit 5c84281
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions RotationSolver.Basic/Actions/BaseAction/BaseAction_Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ private bool TargetAreaFriend(float range, bool mustUse, PlayerCharacter player)
if (Service.TargetManager.Target is BattleChara b && b.DistanceToPlayer() < range && b.IsBoss() && b.HasPositional())
{
_position = b.Position;
return true;
}
//计算玩家和被打的T之间的关系。
else
Expand All @@ -174,7 +173,7 @@ private bool TargetAreaFriend(float range, bool mustUse, PlayerCharacter player)
}
else
{
var disToTankRound = Math.Max(range, Vector3.Distance(player.Position, attackT.Position) + attackT.HitboxRadius);
var disToTankRound = Vector3.Distance(player.Position, attackT.Position) + attackT.HitboxRadius;

if (disToTankRound < _action.EffectRange
|| disToTankRound > 2 * _action.EffectRange - player.HitboxRadius
Expand All @@ -189,8 +188,8 @@ private bool TargetAreaFriend(float range, bool mustUse, PlayerCharacter player)
_position = player.Position + MoveDirection;
}
}
return true;
}
return true;
}
#endregion

Expand Down

0 comments on commit 5c84281

Please sign in to comment.