Skip to content

Commit

Permalink
fix skill Auto direction Not in effect
Browse files Browse the repository at this point in the history
  • Loading branch information
Controllerdestiny committed Jan 20, 2025
1 parent e5b1ffd commit b1437dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Economics.Skill/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ internal static void CycleAdapr(TSPlayer ply, Vector2 vel, Vector2 pos, Projecti
{
foreach (var opt in option.ProjectileCycle.ProjectileCycles)
{
Vector2 _vel;
var _vel = vel;
#region 锁定敌怪
if (option.LockNpcOption.Enable && option.LockNpcOption.Lock && lockNpc != null)
{
pos.Distance(lockNpc.Center);
_vel = (pos.DirectionTo(lockNpc.Center).SafeNormalize(-Vector2.UnitY) * lockNpc.velocity.Length()).ToLenOf(option.Speed);
}
else
if(!option.AutoDirection)
{
_vel = vel.RotationAngle(option.StartAngle).ToLenOf(option.Speed);
}
Expand Down

0 comments on commit b1437dd

Please sign in to comment.