Set character preview's simulationTime to 0 to avoid flickering lights

This commit is contained in:
scrawl 2017-02-21 18:25:25 +01:00
parent c45013c983
commit e38221edc9

View file

@ -42,7 +42,16 @@ namespace MWRender
mRendered = true;
mLastRenderedFrame = nv->getTraversalNumber();
osg::ref_ptr<osg::FrameStamp> previousFramestamp = const_cast<osg::FrameStamp*>(nv->getFrameStamp());
osg::FrameStamp* fs = new osg::FrameStamp(*previousFramestamp);
fs->setSimulationTime(0.0);
nv->setFrameStamp(fs);
traverse(node, nv);
nv->setFrameStamp(previousFramestamp);
}
else
{