]> git.mxchange.org Git - simgear.git/commitdiff
Use simulation time for spin and timed animations
authorThomas Geymayer <tomgey@gmail.com>
Thu, 9 May 2013 23:11:46 +0000 (01:11 +0200)
committerThomas Geymayer <tomgey@gmail.com>
Thu, 9 May 2013 23:11:46 +0000 (01:11 +0200)
simgear/scene/model/animation.cxx

index 649cc108b960b0bdba52a475cbc8e5a33fa24637..fa9931a42ab5dcced0871183b2ee3976e573ef16 100644 (file)
@@ -850,7 +850,7 @@ void SpinAnimCallback::operator()(osg::Node* node, osg::NodeVisitor* nv)
     if (!cv)
         return;
     if (!_condition || _condition->test()) {
-        double t = nv->getFrameStamp()->getReferenceTime();
+        double t = nv->getFrameStamp()->getSimulationTime();
         double rps = _animationValue->getValue() / 60.0;
         ref_ptr<ReferenceValues>
             refval(static_cast<ReferenceValues*>(_referenceValues.get()));
@@ -1862,7 +1862,7 @@ public:
     _current_index = _current_index % nChildren;
 
     // update the time and compute the current systems time value
-    double t = nv->getFrameStamp()->getReferenceTime();
+    double t = nv->getFrameStamp()->getSimulationTime();
     if (_last_time_sec == SGLimitsd::max()) {
       _last_time_sec = t;
     } else {