Fixed particle update bug where a ParticleSystem wouldn't start when loaded during the frame loop due to the _last_frame value not being set.
This commit is contained in:
@@ -211,8 +211,6 @@ void osgParticle::ParticleSystem::update(double dt, osg::NodeVisitor& nv)
|
||||
|
||||
void osgParticle::ParticleSystem::drawImplementation(osg::RenderInfo& renderInfo) const
|
||||
{
|
||||
if (_particles.size() <= 0) return;
|
||||
|
||||
ScopedReadLock lock(_readWriteMutex);
|
||||
|
||||
osg::State& state = *renderInfo.getState();
|
||||
@@ -221,6 +219,8 @@ void osgParticle::ParticleSystem::drawImplementation(osg::RenderInfo& renderInfo
|
||||
// this particle system is culled
|
||||
_last_frame = state.getFrameStamp()->getFrameNumber();
|
||||
|
||||
if (_particles.size() <= 0) return;
|
||||
|
||||
// update the dirty flag of delta time, so next time a new request for delta time
|
||||
// will automatically cause recomputing
|
||||
_dirty_dt = true;
|
||||
|
||||
Reference in New Issue
Block a user