Skip to content

Commit 1775e05

Browse files
committed
Made things a bit better
1 parent 8470abc commit 1775e05

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Data/Base.rte/AI/SharedBehaviors.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -726,12 +726,12 @@ function SharedBehaviors.GoToWpt(AI, Owner, Abort)
726726
if math.abs(angDiff) < 0.1 then
727727
AI.Ctrl.AnalogAim = DigTarget.Normalized; -- aim in the direction of the next waypoint
728728
sweepCW = not sweepCW;
729+
else
730+
local sweepSpeed = 2.5;
731+
local sweepDir = sweepCW and 1 or -1;
732+
AI.Ctrl.AnalogAim = (Vector(AimVec.X, AimVec.Y):RadRotate(sweepDir*TimerMan.AIDeltaTimeSecs*sweepSpeed)).Normalized;
729733
end
730734

731-
local sweepSpeed = 2.5;
732-
local sweepDir = sweepCW and 1 or -1;
733-
AI.Ctrl.AnalogAim = (Vector(AimVec.X, AimVec.Y):RadRotate(sweepDir*TimerMan.AIDeltaTimeSecs*sweepSpeed)).Normalized;
734-
735735
-- check if we are done when we get close enough to the waypoint
736736
if Owner.AIMode == Actor.AIMODE_GOLDDIG then
737737
Waypoint.Pos = SceneMan:MovePointToGround(Waypoint.Pos, Owner.Height*0.2, 4);

0 commit comments

Comments
 (0)