[Orxonox-commit 3307] r7996 - code/branches/usability/src/libraries/core

rgrieder at orxonox.net rgrieder at orxonox.net
Mon Feb 28 04:10:21 CET 2011


Author: rgrieder
Date: 2011-02-28 04:10:21 +0100 (Mon, 28 Feb 2011)
New Revision: 7996

Modified:
   code/branches/usability/src/libraries/core/GraphicsManager.cc
Log:
And I though I specifically paid attention to rounding problems. Brain short circuit ^^

Modified: code/branches/usability/src/libraries/core/GraphicsManager.cc
===================================================================
--- code/branches/usability/src/libraries/core/GraphicsManager.cc	2011-02-28 02:47:08 UTC (rev 7995)
+++ code/branches/usability/src/libraries/core/GraphicsManager.cc	2011-02-28 03:10:21 UTC (rev 7996)
@@ -377,7 +377,7 @@
 
         // Translate to Ogre float times before the update
         float temp = lastFrameStartTime_;
-        lastFrameStartTime_ = (float)(timeBeforeTick / 1000000);
+        lastFrameStartTime_ = (float)timeBeforeTick * 0.000001f;
         evt.timeSinceLastFrame = lastFrameStartTime_ - temp;
         evt.timeSinceLastEvent = lastFrameStartTime_ - lastFrameEndTime_;
 
@@ -400,7 +400,7 @@
 
         // Translate to Ogre float times after the update
         temp = lastFrameEndTime_;
-        lastFrameEndTime_ = (float)(timeAfterTick / 1000000);
+        lastFrameEndTime_ = (float)timeBeforeTick * 0.000001f;
         evt.timeSinceLastFrame = lastFrameEndTime_ - temp;
         evt.timeSinceLastEvent = lastFrameEndTime_ - lastFrameStartTime_;
 




More information about the Orxonox-commit mailing list