0ad/source
wraitii 2233a76e2a Fix units sometimes turning around when fleeing (introduced by D1987/99a341f379)
D1987/99a341f379 introduced logic to predict the target movement, which
fixed unit chasing. However, sometimes fleeing units would then predict
that their target will end up in front of them, so they turned around
towards the attacker.

This is fixed by not anticipating the position when it would cause the
vector towards to target to change direction.

Reported By: Freagarach
Tested By: Freagarach
Fixes #5541

Differential Revision: https://code.wildfiregames.com/D2275
This was SVN commit r22885.
2019-09-10 18:11:07 +00:00
..
collada Fix compiler warnings on VS 2015, refs #3439, refs #5069. 2018-03-10 09:58:53 +00:00
graphics Remove some unused Profiler.h and CLogger.h includes. 2019-09-07 13:35:45 +00:00
gui Remove some unused Profiler.h and CLogger.h includes. 2019-09-07 13:35:45 +00:00
i18n Remove some unused Profiler.h and CLogger.h includes. 2019-09-07 13:35:45 +00:00
lib pthread -> std::thread (4/7) - Replace pthread in remaining files 2019-08-15 09:07:16 +00:00
lobby Pass XmppClient CertificateErrorToString independent of ConnectionErrorToString to JS using D2264 / 9023f4bebb, refs #4482. 2019-09-09 21:26:58 +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 Fix previous (invalid Freeze 508da732af). 2019-09-07 17:04:04 +00:00
pch pthread -> std::thread (5/7) - Replace sdl semaphore with condition variable 2019-08-24 11:26:58 +00:00
ps Implement NetClient PushGuiMessage using parameter pack and ScriptInterface::CreateObject from D2080 / b4626359f5 to replace remaining Eval function calls. 2019-09-07 16:51:44 +00:00
renderer Fix algorithmic error in 9903fd8a6c (waves computation speedup), and delete unused code. 2019-09-07 08:50:55 +00:00
scriptinterface Implement NetClient PushGuiMessage using parameter pack and ScriptInterface::CreateObject from D2080 / b4626359f5 to replace remaining Eval function calls. 2019-09-07 16:51:44 +00:00
simulation2 Fix units sometimes turning around when fleeing (introduced by D1987/99a341f379) 2019-09-10 18:11:07 +00:00
soundmanager Remove some unused Profiler.h and CLogger.h includes. 2019-09-07 13:35:45 +00:00
third_party Removes deprecated 'register' storage class from mongoose. Refs #3068 2019-07-18 06:28:51 +00:00
tools Remove default CGame constructor values to make the code less error-prone, use CRenderer::IsInitialised() to test if the CGame should be rendered to remove indirection/proxies, making the code easier to read. 2019-08-25 11:02:55 +00:00
main.cpp Alt+tab fix for ca9109be75 - call sound IdleTask in Atlas and swap buffers only once in Atlas. 2019-07-24 16:40:34 +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