Skip to content

Commit b2c504e

Browse files
committed
Fixed game freeze whenever creating a squad
1 parent b54c03a commit b2c504e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Data/Base.rte/AI/SharedBehaviors.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,9 @@ function SharedBehaviors.GoToWpt(AI, Owner, Abort)
630630
AI.lateralMoveState = Actor.LAT_STILL;
631631
AI.jump = false;
632632

633+
local _ai, _ownr, _abrt = coroutine.yield(); -- wait until next frame
634+
if _abrt then return true end
635+
633636
if Owner.MOMoveTarget and MovableMan:ValidMO(Owner.MOMoveTarget) then
634637
Trace = SceneMan:ShortestDistance(Owner.Pos, Owner.MOMoveTarget.Pos, false);
635638
if Trace.Largest > Owner.Height * 0.4 + (Owner.MOMoveTarget.Height or 100) * 0.4 or

0 commit comments

Comments
 (0)