mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-27 08:27:01 +00:00
Add accelerations in unit movement.
This helps preventing arrow dodging. Differential Revision: D3200 Reviewed By: Freagarach Comments By: wraitii, vladislav, Palaxin, Stan refs: #5106 This was SVN commit r25953.
This commit is contained in:
@@ -167,6 +167,7 @@ void CCmpUnitMotionManager::Move(EntityMap<MotionState>& ents, fixed dt)
|
||||
it->second.initialPos = it->second.cmpPosition->GetPosition2D();
|
||||
it->second.initialAngle = it->second.cmpPosition->GetRotation().Y;
|
||||
it->second.pos = it->second.initialPos;
|
||||
it->second.speed = it->second.cmpUnitMotion->GetCurrentSpeed();
|
||||
it->second.angle = it->second.initialAngle;
|
||||
ENSURE(it->second.pos.X.ToInt_RoundToZero() / PUSHING_GRID_SIZE < m_MovingUnits.width() &&
|
||||
it->second.pos.Y.ToInt_RoundToZero() / PUSHING_GRID_SIZE < m_MovingUnits.height());
|
||||
|
||||
Reference in New Issue
Block a user