mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-04 02:41:19 +00:00
use particle data for particle system quota
This commit is contained in:
parent
d843ec321e
commit
4bbbbb00f6
@ -123,6 +123,7 @@
|
|||||||
Bug #5995: NiUVController doesn't calculate the UV offset properly
|
Bug #5995: NiUVController doesn't calculate the UV offset properly
|
||||||
Bug #6007: Crash when ending cutscene is playing
|
Bug #6007: Crash when ending cutscene is playing
|
||||||
Bug #6016: Greeting interrupts Fargoth's sneak-walk
|
Bug #6016: Greeting interrupts Fargoth's sneak-walk
|
||||||
|
Bug #6028: Particle system controller values are incorrectly used
|
||||||
Feature #390: 3rd person look "over the shoulder"
|
Feature #390: 3rd person look "over the shoulder"
|
||||||
Feature #832: OpenMW-CS: Handle deleted references
|
Feature #832: OpenMW-CS: Handle deleted references
|
||||||
Feature #1536: Show more information about level on menu
|
Feature #1536: Show more information about level on menu
|
||||||
|
@ -954,13 +954,17 @@ namespace NifOsg
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Load the initial state of the particle system, i.e. the initial particles and their positions, velocity and colors.
|
// Load the initial state of the particle system, i.e. the initial particles and their positions, velocity and colors.
|
||||||
void handleParticleInitialState(const Nif::Node* nifNode, osgParticle::ParticleSystem* partsys, const Nif::NiParticleSystemController* partctrl)
|
void handleParticleInitialState(const Nif::Node* nifNode, ParticleSystem* partsys, const Nif::NiParticleSystemController* partctrl)
|
||||||
{
|
{
|
||||||
auto particleNode = static_cast<const Nif::NiParticles*>(nifNode);
|
auto particleNode = static_cast<const Nif::NiParticles*>(nifNode);
|
||||||
if (particleNode->data.empty() || particleNode->data->recType != Nif::RC_NiParticlesData)
|
if (particleNode->data.empty() || particleNode->data->recType != Nif::RC_NiParticlesData)
|
||||||
|
{
|
||||||
|
partsys->setQuota(partctrl->numParticles);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
auto particledata = static_cast<const Nif::NiParticlesData*>(particleNode->data.getPtr());
|
auto particledata = static_cast<const Nif::NiParticlesData*>(particleNode->data.getPtr());
|
||||||
|
partsys->setQuota(particledata->numParticles);
|
||||||
|
|
||||||
osg::BoundingBox box;
|
osg::BoundingBox box;
|
||||||
|
|
||||||
@ -1095,8 +1099,6 @@ namespace NifOsg
|
|||||||
|
|
||||||
handleParticleInitialState(nifNode, partsys, partctrl);
|
handleParticleInitialState(nifNode, partsys, partctrl);
|
||||||
|
|
||||||
partsys->setQuota(partctrl->numParticles);
|
|
||||||
|
|
||||||
partsys->getDefaultParticleTemplate().setSizeRange(osgParticle::rangef(partctrl->size, partctrl->size));
|
partsys->getDefaultParticleTemplate().setSizeRange(osgParticle::rangef(partctrl->size, partctrl->size));
|
||||||
partsys->getDefaultParticleTemplate().setColorRange(osgParticle::rangev4(osg::Vec4f(1.f,1.f,1.f,1.f), osg::Vec4f(1.f,1.f,1.f,1.f)));
|
partsys->getDefaultParticleTemplate().setColorRange(osgParticle::rangev4(osg::Vec4f(1.f,1.f,1.f,1.f), osg::Vec4f(1.f,1.f,1.f,1.f)));
|
||||||
partsys->getDefaultParticleTemplate().setAlphaRange(osgParticle::rangef(1.f, 1.f));
|
partsys->getDefaultParticleTemplate().setAlphaRange(osgParticle::rangef(1.f, 1.f));
|
||||||
|
Loading…
Reference in New Issue
Block a user