Page MenuHomeWildfire Games

Prevent UnitMotion from stopping on its own, and make unitAI not trust "MoveCompleted" messages
Needs ReviewPublic

Authored by wraitii on Mon, May 13, 9:37 PM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Summary

Part of the reason why units get stuck currently is that UnitMotion sometimes decides to Stop Moving on its own (when it can't get a path, for example). Then, if unitAI didn't actually expect to stop moving, we get stuck.

After D1865, UnitAI will always call StopMoving() on its own so these can be removed from UnitMotion. Now when we call "MoveTo", unitMotion will try going there forever. This prevents stuck-ness.

UnitMotion also tells UnitAI that it's arrived with "MoveCompleted" messages, but these actually could be wrong - unitAI could decide that we didn't want to stop after all - so we'll treat them as hints in UnitAI instead.

Test Plan

Review changes, test in-game behaviour. In practice there shouldn't be much changing here.

Diff Detail