Fix issues with motionManager / bae258f9a1

Fixes bae258f9a1.

As reported by Freagarach, garrisoned units trigger error messages.
As reported by Vladislavbelov, noPCH was broken & there were some style
issues.


Differential Revision: https://code.wildfiregames.com/D3707
This was SVN commit r25078.
This commit is contained in:
wraitii
2021-03-18 16:40:34 +00:00
parent dc18d94030
commit 961ac314ad
4 changed files with 24 additions and 12 deletions
@@ -914,7 +914,8 @@ void CCmpUnitMotion::OnTurnStart()
void CCmpUnitMotion::PreMove(ICmpUnitMotionManager::MotionState& state)
{
// If we were idle and will still be, no need for an update.
state.needUpdate = m_CurSpeed != fixed::Zero() || m_MoveRequest.m_Type != MoveRequest::NONE;
state.needUpdate = state.cmpPosition->IsInWorld() &&
(m_CurSpeed != fixed::Zero() || m_MoveRequest.m_Type != MoveRequest::NONE);
}
void CCmpUnitMotion::Move(ICmpUnitMotionManager::MotionState& state, fixed dt)