From b828f5c0838de8f3d867bdb2be184ea285018f04 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 2 Jan 2012 16:54:05 +0000 Subject: [PATCH] From Farshid Lashkari, "Attached is a simple fix to osg::Sequence that allows it to load properly with the serializer formats (osgt/osgb). The problem was that the internal _nrepsRemain member was not being initialized properly if the number of repeats was equal to the default value of -1. When the number of repeats is explicitly set using setNumRepeats(), _nrepsRemain is set to the same value. However, in the constructor of osg::Sequence, it was not being initialized to the same value as _nreps. This fix simply changes the initial value of _nrepsRemain to the same as _nreps." --- src/osg/Sequence.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osg/Sequence.cpp b/src/osg/Sequence.cpp index 355880003..a46b27096 100644 --- a/src/osg/Sequence.cpp +++ b/src/osg/Sequence.cpp @@ -31,7 +31,7 @@ Sequence::Sequence() : _end(-1), _speed(0), _nreps(-1), - _nrepsRemain(0), + _nrepsRemain(-1), _step(0), _defaultTime(1.), _lastFrameTime(0.),