From 6f649daa6bd52d51a1e1f1e94dabbe94a5681c92 Mon Sep 17 00:00:00 2001 From: Titus Tscharntke Date: Sun, 17 Jul 2011 21:47:56 +0000 Subject: [PATCH] I hope rotated climb works now... ( angle correction is a bit smoother now ) --- source/glest_game/type_instances/unit.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/glest_game/type_instances/unit.cpp b/source/glest_game/type_instances/unit.cpp index ebc2eefc..56a6c7c9 100644 --- a/source/glest_game/type_instances/unit.cpp +++ b/source/glest_game/type_instances/unit.cpp @@ -484,9 +484,9 @@ void Unit::calculateXZRotation(){ const Vec3f normal= sc->getNormal(); #ifdef USE_STREFLOP - float targetRotationZ= radToDeg(streflop::atan2(abs(normal.x), abs(normal.y))); + targetRotationZ= radToDeg(streflop::atan2(abs(normal.x), abs(normal.y))); #else - float targetRotationZ= radToDeg(atan2(abs(normal.x), abs(normal.y))); + targetRotationZ= radToDeg(atan2(abs(normal.x), abs(normal.y))); #endif if((normal.y < 0 || normal.x < 0) && !(normal.y < 0 && normal.x < 0)){ @@ -506,7 +506,7 @@ void Unit::calculateXZRotation(){ } //For smooth rotation we now softly adjust the angle - int adjustStep= 2; + int adjustStep= 1; if(rotationZ < targetRotationZ){ if(rotationZ + adjustStep > targetRotationZ){ rotationZ= targetRotationZ;