Fix out of range exception when try to load a particle node with empty sizes array (bug #4804)

pull/2132/head
Andrei Kortunov 5 years ago
parent ed5df29b42
commit 39c4a7833c

@ -20,6 +20,7 @@
Bug #4778: Interiors of Illusion puzzle in Sotha Sil Expanded mod is broken
Bug #4800: Standing collisions are not updated immediately when an object is teleported without a cell change
Bug #4803: Stray special characters before begin statement break script compilation
Bug #4804: Particle system with the "Has Sizes = false" causes an exception
Feature #2229: Improve pathfinding AI
Feature #3442: Default values for fallbacks from ini file
Feature #3610: Option to invert X axis

@ -822,7 +822,9 @@ namespace NifOsg
if (particle.vertex < int(particledata->colors.size()))
partcolor = particledata->colors.at(particle.vertex);
float size = particledata->sizes.at(particle.vertex) * partctrl->size;
float size = partctrl->size;
if (particle.vertex < int(particledata->sizes.size()))
size *= particledata->sizes.at(particle.vertex);
created->setSizeRange(osgParticle::rangef(size, size));
box.expandBy(osg::BoundingSphere(position, size));

Loading…
Cancel
Save