1
1
forked from 0ad/0ad
0ad/source
wraitii 45d136d57e Fix GetPosition2D call when the entity may be out of the world in unitMotion
As reported by Freagarach following a7da40ac2f.

32e8ed51aa introduced a "MoveObstructed" message, that could be sent
when the entity ran into obstructions, to stop early.
In HandleObstructedMove, my intention, as written in the comment, was
that the caller would do its thing (call StopMoving(), move out of the
world etc.) and thus ComputeGoal would return early.

However, I mistakenly left the `cmpPosition->GetPosition2D()` in between
that and ComputeGoal, which would then fail.

This fixes that by moving it after the `ComputeGoal` call.

Also add a sanity StopMoving() call to a7da40ac2f's move-out-of-world
call.

Reported by: Freagarach
Differential Revision: https://code.wildfiregames.com/D2935
This was SVN commit r23940.
2020-08-06 08:40:14 +00:00
..
collada Fix compiler warnings on VS 2015, refs #3439, refs #5069. 2018-03-10 09:58:53 +00:00
graphics Fixes terrain index type (causing a warning) introduced in 1e1ce27eba. 2020-07-07 16:51:20 +00:00
gui Fix text input max_length attribute. fixes 5593f573f4 2020-08-03 12:39:25 +00:00
i18n Remove some unused Profiler.h and CLogger.h includes. 2019-09-07 13:35:45 +00:00
lib Fix issues relating to SDL and wxWidgets interaction in Atlas. 2020-08-03 12:23:16 +00:00
lobby Rework ScriptInterface EnumeratePropertyNames to support non-enumerable properties. 2020-06-14 09:49:32 +00:00
maths CVector2D: Fix members may not be initialized warnings 2020-06-21 18:21:31 +00:00
mocks More FreeBSD build fixes. 2012-01-30 06:21:11 +00:00
network Fix segfault when sending a very large net chat message. 2020-08-01 15:25:13 +00:00
pch Precompiled logic update [Windows build] 2019-12-31 13:58:48 +00:00
ps Fix compilation error on arch introduced by 5473393e30 2020-08-05 09:25:24 +00:00
renderer Makes FXAA working only for GLSL and disabled for ARB. 2020-07-24 18:48:18 +00:00
rlinterface Add an interface for Reinforcement Learning. 2020-08-01 10:52:59 +00:00
scriptinterface Stop failing if mod is broken and display invalid mods in downloader [Mod Io] 2020-07-12 09:25:03 +00:00
simulation2 Fix GetPosition2D call when the entity may be out of the world in unitMotion 2020-08-06 08:40:14 +00:00
soundmanager Removes duplication of Clamp function. 2019-09-26 21:14:21 +00:00
third_party Fix gcc warning reported by Imarok after 204e17206b 2020-05-23 12:21:49 +00:00
tools Fix issues relating to SDL and wxWidgets interaction in Atlas. 2020-08-03 12:23:16 +00:00
main.cpp Fix issues relating to SDL and wxWidgets interaction in Atlas. 2020-08-03 12:23:16 +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