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."

This commit is contained in:
Robert Osfield
2012-01-02 16:54:05 +00:00
parent d9fd29d996
commit b828f5c083

View File

@@ -31,7 +31,7 @@ Sequence::Sequence() :
_end(-1),
_speed(0),
_nreps(-1),
_nrepsRemain(0),
_nrepsRemain(-1),
_step(0),
_defaultTime(1.),
_lastFrameTime(0.),