From c45013c983e70a9d3cba1bbdea91b52c8b24c250 Mon Sep 17 00:00:00 2001 From: scrawl Date: Tue, 21 Feb 2017 18:15:30 +0100 Subject: [PATCH] Fix particle systems not being rendered in their first frame --- components/nifosg/nifloader.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/components/nifosg/nifloader.cpp b/components/nifosg/nifloader.cpp index 9624e7396..d0febe2fb 100644 --- a/components/nifosg/nifloader.cpp +++ b/components/nifosg/nifloader.cpp @@ -1038,10 +1038,12 @@ namespace NifOsg if (!(animflags & Nif::NiNode::ParticleFlag_AutoPlay)) { partsys->setFrozen(true); - // HACK: particle system will not render in Frozen state if there was no update - osg::NodeVisitor nv; - partsys->update(0.0, nv); } + + // Due to odd code in the ParticleSystemUpdater, particle systems will not be updated in the first frame + // So do that update manually + osg::NodeVisitor nv; + partsys->update(0.0, nv); } // affectors must be attached *after* the emitter in the scene graph for correct update order