Merge pull request #2132 from akortunov/particlefix

Fix an exception when try to load a particle node with empty sizes array
pull/541/head
Bret Curtis 6 years ago committed by GitHub
commit 6fd4d016eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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