HomeWildfire Games

Improve gathering behaviour when a target is not reachable

Description

Improve gathering behaviour when a target is not reachable

Units can be stuck in gather states when the target ought to be collectable from, but it's actually unreachable.

A new FINDINGNEWTARGET intermediate state for GATHER will try and find a new, different target to collect from. This should generally improve the behaviour (perfect reachability checks would be required to completely fix it).
Use this also when the target is knowably unreachable / uncollectible.

Fixes #5529

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

Event Timeline

elexis raised a concern with this commit.Sep 1 2019, 12:44 PM
elexis added a subscriber: elexis.
elexis added inline comments.
/ps/trunk/source/simulation2/components/ICmpRangeManager.cpp
46

Duplication

/ps/trunk/source/simulation2/components/ICmpRangeManager.h
355

Double /** triggers clang warning

In file included from ../../../source/simulation2/components/tests/test_RangeManager.cpp:17:
In file included from /home/elexis/code/0ad-svn/trunk/source/simulation2/components/tests/test_RangeManager.h:19:
../../../source/simulation2/components/ICmpRangeManager.h:355:2: warning: '/*' within block comment [-Wcomment]
        /**
        ^
This commit now has outstanding concerns.Sep 1 2019, 12:44 PM
elexis removed an auditor: elexis.Sep 1 2019, 4:13 PM

Thanks for the fix.

This commit no longer requires audit.Sep 1 2019, 4:13 PM