mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 07:53:51 +00:00
Merge pull request #2132 from akortunov/particlefix
Fix an exception when try to load a particle node with empty sizes array
This commit is contained in:
commit
6fd4d016eb
2 changed files with 4 additions and 1 deletions
|
@ -20,6 +20,7 @@
|
||||||
Bug #4778: Interiors of Illusion puzzle in Sotha Sil Expanded mod is broken
|
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 #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 #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 #2229: Improve pathfinding AI
|
||||||
Feature #3442: Default values for fallbacks from ini file
|
Feature #3442: Default values for fallbacks from ini file
|
||||||
Feature #3610: Option to invert X axis
|
Feature #3610: Option to invert X axis
|
||||||
|
|
|
@ -822,7 +822,9 @@ namespace NifOsg
|
||||||
if (particle.vertex < int(particledata->colors.size()))
|
if (particle.vertex < int(particledata->colors.size()))
|
||||||
partcolor = particledata->colors.at(particle.vertex);
|
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));
|
created->setSizeRange(osgParticle::rangef(size, size));
|
||||||
box.expandBy(osg::BoundingSphere(position, size));
|
box.expandBy(osg::BoundingSphere(position, size));
|
||||||
|
|
Loading…
Reference in a new issue