diff --git a/CHANGELOG.md b/CHANGELOG.md index 44e6aa3c6..0fda600fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/components/nifosg/nifloader.cpp b/components/nifosg/nifloader.cpp index 29e6ff4f4..08f6eb96c 100644 --- a/components/nifosg/nifloader.cpp +++ b/components/nifosg/nifloader.cpp @@ -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));