Fix bounding box assertions due to negative particle life time

Other parts of the code could not deal with negative life times and produced negative particle sizes as a result (which Ogre could not handle)
actorid
scrawl 11 years ago
parent df78357e05
commit cf3812188f

@ -749,8 +749,8 @@ class NIFObjectLoader
emitter->setParticleVelocity(partctrl->velocity - partctrl->velocityRandom*0.5f,
partctrl->velocity + partctrl->velocityRandom*0.5f);
emitter->setEmissionRate(partctrl->emitRate);
emitter->setTimeToLive(partctrl->lifetime - partctrl->lifetimeRandom*0.5f,
partctrl->lifetime + partctrl->lifetimeRandom*0.5f);
emitter->setTimeToLive(partctrl->lifetime,
partctrl->lifetime + partctrl->lifetimeRandom);
emitter->setParameter("width", Ogre::StringConverter::toString(partctrl->offsetRandom.x));
emitter->setParameter("height", Ogre::StringConverter::toString(partctrl->offsetRandom.y));
emitter->setParameter("depth", Ogre::StringConverter::toString(partctrl->offsetRandom.z));

Loading…
Cancel
Save