From 6c6750342c321b537fcc7cc14246050fc4bf2580 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 10 Apr 2013 13:37:20 -0700 Subject: [PATCH] Specified particle size is actually the radius --- components/nif/data.hpp | 4 ++-- components/nifogre/ogrenifloader.cpp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/components/nif/data.hpp b/components/nif/data.hpp index bd109041f..f1f34184b 100644 --- a/components/nif/data.hpp +++ b/components/nif/data.hpp @@ -167,7 +167,7 @@ class NiAutoNormalParticlesData : public ShapeData public: int numParticles; - float particleSize; + float particleRadius; int activeCount; @@ -180,7 +180,7 @@ public: // Should always match the number of vertices numParticles = nif->getUShort(); - particleSize = nif->getFloat(); + particleRadius = nif->getFloat(); activeCount = nif->getUShort(); if(nif->getInt()) diff --git a/components/nifogre/ogrenifloader.cpp b/components/nifogre/ogrenifloader.cpp index 3c876283e..62732d387 100644 --- a/components/nifogre/ogrenifloader.cpp +++ b/components/nifogre/ogrenifloader.cpp @@ -1543,7 +1543,8 @@ class NIFObjectLoader : Ogre::ManualResourceLoader vertprop, zprop, specprop, wireprop, needTangents)); - partsys->setDefaultDimensions(particledata->particleSize, particledata->particleSize); + partsys->setDefaultDimensions(particledata->particleRadius*2.0f, + particledata->particleRadius*2.0f); partsys->setCullIndividually(false); partsys->setParticleQuota(particledata->numParticles);