From f15877f89b68fa59ac2cfed30978cb2365157f5e Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 24 Aug 2004 18:23:53 +0000 Subject: [PATCH] Changed the AnimationPathCallback::reset() to reset the _firstTime to DBL_MAX so that it resets on the next update traversal. --- src/osg/AnimationPath.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/osg/AnimationPath.cpp b/src/osg/AnimationPath.cpp index 3e7cc735a..e7ef6e09f 100644 --- a/src/osg/AnimationPath.cpp +++ b/src/osg/AnimationPath.cpp @@ -197,8 +197,13 @@ void AnimationPathCallback::update(osg::Node& node) void AnimationPathCallback::reset() { +#if 1 + _firstTime = DBL_MAX; + _pauseTime = DBL_MAX; +#else _firstTime = _latestTime; _pauseTime = _latestTime; +#endif } void AnimationPathCallback::setPause(bool pause) @@ -209,6 +214,9 @@ void AnimationPathCallback::setPause(bool pause) } _pause = pause; + + if (_firstTime==DBL_MAX) return; + if (_pause) { _pauseTime = _latestTime;