HomeWildfire Games

Fix leftovers from rP22313 - improve repairing, chasing and fleeing behaviour.

Description

Fix leftovers from rP22313 - improve repairing, chasing and fleeing behaviour.

rP22313 made states more caller-independent but did not change some callsites to be compatible with that. This fixes those.

This does not fix chasing entirely however since unitMotion does not always recognize that the target moved enough that the entity will never be in range.
This will be fixed upstream.

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

Details

Event Timeline

wraitii added inline comments.Mon, Jun 17, 8:26 PM
/ps/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
2238

That happened to be too optimistic, it broke gathering from a resource that would become hidden in FOW when the unit returned resources (the above check fails for visibility, and then we return to the initial herd position instead of to the unit). I'm not sure this was ever really intended for this but refs rP13803.