0ad/source
wraitii f990cd2381 Ensure units do get in attacking range since that range can change over time because of elevation differences.
This is a partial revert of 4fda917f46, which skipped the
"MoveToTargetAttackingRange" in APPROACHING. I (incorrectly) assumed
that the original order was still perfectly fine, but in fact the
attacker's max range may have changed as that depends on the relative
elevation between attack and target - and so the original order might
never get us in range!
This was introduced originally in 8c74df2acd.

Add a comment to clarify this.

Further, this makes sure UnitMotion still is aware that it has a target
even if it is in range from the beginning, as that could lead
to stuckiness (and did when chasing sometimes). This was done in D1984
anyways.

Fixes #5478.

Differential Revision: https://code.wildfiregames.com/D2035
This was SVN commit r22429.
2019-07-03 18:05:11 +00:00
..
collada Fix compiler warnings on VS 2015, refs #3439, refs #5069. 2018-03-10 09:58:53 +00:00
graphics Refactors camera projections - makes projection functions of camera more clear. 2019-06-26 22:54:05 +00:00
gui [CChart] Add a percentage format and round displayed integers 2019-05-13 21:23:26 +00:00
i18n Simple refactoring of Singleton. Make it non-copyable. 2019-01-13 15:11:40 +00:00
lib Update precompiled win32 libogg to 1.3.3 and libvorbis to 1.3.6, building them with VS2015, refs #5379. 2019-06-27 22:36:04 +00:00
lobby recieve -> receive 2019-04-07 16:06:10 +00:00
maths Cleanups BoundingBoxAxisAligned and fixes coding styles a bit. 2019-06-12 20:23:14 +00:00
mocks More FreeBSD build fixes. 2012-01-30 06:21:11 +00:00
network Clean up ThreadUtil, use standard C++11 constructs instead of custom ones. 2019-06-06 19:30:48 +00:00
pch Update precompiled headers to improve build times. 2019-05-26 07:21:12 +00:00
ps Refactors camera projections - makes projection functions of camera more clear. 2019-06-26 22:54:05 +00:00
renderer Refactors camera projections - makes projection functions of camera more clear. 2019-06-26 22:54:05 +00:00
scriptinterface SpiderMonkey-related changes in preparation for the upgrade to SpiderMonkey 45, refs #4893. 2019-01-13 16:37:41 +00:00
simulation2 Ensure units do get in attacking range since that range can change over time because of elevation differences. 2019-07-03 18:05:11 +00:00
soundmanager Clean up ThreadUtil, use standard C++11 constructs instead of custom ones. 2019-06-06 19:30:48 +00:00
third_party Use libsodium for cryptography. 2018-04-08 21:41:31 +00:00
tools Refactors camera projections - makes projection functions of camera more clear. 2019-06-26 22:54:05 +00:00
main.cpp Fix a crash on some system when Alt-tabbing during game setup. 2019-05-28 13:18:32 +00:00
test_setup.cpp Fix string format of the JS test assertion failure following 7c2e9027c2 (cxxtest expects a char* instead of a std::wstring, so newlines were printed as \n characters). 2017-10-13 21:56:45 +00:00