From f764f243d2e42ac5e63a9f44e49deee641a69226 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 6 Apr 2013 06:44:34 -0700 Subject: [PATCH] Fix the particle quota --- components/nif/data.hpp | 4 +++- components/nifogre/ogrenifloader.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/components/nif/data.hpp b/components/nif/data.hpp index c13495ff8..0804b53ae 100644 --- a/components/nif/data.hpp +++ b/components/nif/data.hpp @@ -165,6 +165,8 @@ public: class NiAutoNormalParticlesData : public ShapeData { public: + int numParticles; + float particleSize; int activeCount; @@ -176,7 +178,7 @@ public: ShapeData::read(nif); // Should always match the number of vertices - nif->getUShort(); + numParticles = nif->getUShort(); particleSize = nif->getFloat(); activeCount = nif->getUShort(); diff --git a/components/nifogre/ogrenifloader.cpp b/components/nifogre/ogrenifloader.cpp index 377fa9418..cadedbd70 100644 --- a/components/nifogre/ogrenifloader.cpp +++ b/components/nifogre/ogrenifloader.cpp @@ -1274,7 +1274,7 @@ class NIFMeshLoader : Ogre::ManualResourceLoader partsys->setDefaultDimensions(particledata->particleSize, particledata->particleSize); partsys->setCullIndividually(false); - partsys->setParticleQuota(particledata->activeCount); + partsys->setParticleQuota(particledata->numParticles); Nif::ControllerPtr ctrl = partnode->controller; while(!ctrl.empty())