From: <ko...@us...> - 2009-06-09 05:14:15
|
Revision: 3829 http://planeshift.svn.sourceforge.net/planeshift/?rev=3829&view=rev Author: kougaro Date: 2009-06-09 05:11:04 +0000 (Tue, 09 Jun 2009) Log Message: ----------- Remove some useless calculations Modified Paths: -------------- trunk/src/common/engine/linmove.cpp Modified: trunk/src/common/engine/linmove.cpp =================================================================== --- trunk/src/common/engine/linmove.cpp 2009-06-09 04:40:00 UTC (rev 3828) +++ trunk/src/common/engine/linmove.cpp 2009-06-09 05:11:04 UTC (rev 3829) @@ -231,12 +231,8 @@ csVector3 angle = angularVelocity * delta; if (angleToReachFlag) { - const csMatrix3& transf = mesh->GetMovable () - ->GetTransform ().GetT2O (); - float current_yrot = Matrix2YRot (transf); - current_yrot = atan2f (sin (current_yrot), cos (current_yrot)); - float yrot_delta = fabs (atan2f (sin (angleToReach.y - current_yrot), - cos (angleToReach.y - current_yrot))); + float current_yrot = GetYRotation(); + float yrot_delta = fabs (angleToReach.y - current_yrot); if (fabs(angle.y) > yrot_delta) { angle.y = (angle.y / fabs (angle.y)) * yrot_delta; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |