HomeWildfire Games

Abort formation-walking on any message from UnitMotion.

Description

Abort formation-walking on any message from UnitMotion.

Units in formation can occasionally request many short paths (and thus introduce crippling lag) if their offset is obstructed.
This particularly happen when the formation is idle, since the offset then always remains obstructed.

To prevent this, it is OK to immediately stop pathing on any motion message (obstructed, failure, success). This does not break formation movement since messages are only sent when the formation controller is not moving (this finishes what was started in rP23496).

Ideally, this hack could be removed if the short-pathfinder was quick enough / units were better at aborting.

Fixes concern raised by Freagarach on rP23806.

Refs #5624 in that the max-short-path range is the source of the lag.

Reviewed By: Angen

Differential Revision: https://code.wildfiregames.com/D2871