Skip to content
Browse files

fix 'Move/Turn (piece) fails with negative speed' (3300)

  • Loading branch information...
1 parent 1e63df9 commit cbaa45e571b145475c6f4bc73e2962300d523ea7 rt committed Oct 8, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 rts/Sim/Units/Scripts/UnitScript.cpp
View
4 rts/Sim/Units/Scripts/UnitScript.cpp
@@ -454,13 +454,13 @@ void CUnitScript::StopSpin(int piece, int axis, float decel)
void CUnitScript::Turn(int piece, int axis, float speed, float destination)
{
- AddAnim(ATurn, piece, axis, speed, destination, 0);
+ AddAnim(ATurn, piece, axis, std::max(speed, -speed), destination, 0);
}
void CUnitScript::Move(int piece, int axis, float speed, float destination)
{
- AddAnim(AMove, piece, axis, speed, destination, 0);
+ AddAnim(AMove, piece, axis, std::max(speed, -speed), destination, 0);
}

0 comments on commit cbaa45e

Please sign in to comment.
Something went wrong with that request. Please try again.