Add ability to reset particle system

This commit is contained in:
Phillip Stephens 2016-02-17 20:44:06 -08:00
parent 365f6ac9e7
commit 8cd46293c2
5 changed files with 21 additions and 1 deletions

View File

@ -2230,4 +2230,20 @@ void CElementGen::DestroyParticles()
ch->DestroyParticles(); ch->DestroyParticles();
} }
void CElementGen::Reset()
{
x2c_particleLists.clear();
x3c_parentMatrices.clear();
x234_activePartChildren.clear();;
x248_finishPartChildren.clear();
x280_elscChildren.clear();
x260_swhcChildren.clear();
x50_curFrame = 0;
x58_curSeconds = 0.f;
x64_prevFrame = -1;
x208_activeParticleCount = 0;
x225_28_warmedUp = false;
}
} }

View File

@ -103,7 +103,7 @@ private:
u32 x208_activeParticleCount = 0; u32 x208_activeParticleCount = 0;
u32 x20c_recursiveParticleCount = 0; u32 x20c_recursiveParticleCount = 0;
u32 x210_curEmitterFrame = 0; u32 x210_curEmitterFrame = 0;
int x214_PSLT = 0x7fffff; int x214_PSLT = 90;//0x7fffff;
Zeus::CVector3f x218_PSIV; Zeus::CVector3f x218_PSIV;
bool x224_24_translationDirty = false; bool x224_24_translationDirty = false;
bool x224_25_LIT_; bool x224_25_LIT_;
@ -229,6 +229,7 @@ public:
CLight GetLight() const; CLight GetLight() const;
bool GetParticleEmission() const; bool GetParticleEmission() const;
void DestroyParticles(); void DestroyParticles();
void Reset();
}; };
ENABLE_BITWISE_ENUM(CElementGen::EOptionalSystemFlags) ENABLE_BITWISE_ENUM(CElementGen::EOptionalSystemFlags)

View File

@ -36,6 +36,7 @@ public:
CLight GetLight() const; CLight GetLight() const;
bool GetParticleEmission() const; bool GetParticleEmission() const;
void DestroyParticles(); void DestroyParticles();
void Reset() {}
}; };
} }

View File

@ -42,6 +42,7 @@ public:
virtual CLight GetLight() const=0; virtual CLight GetLight() const=0;
virtual bool GetParticleEmission() const=0; virtual bool GetParticleEmission() const=0;
virtual void DestroyParticles()=0; virtual void DestroyParticles()=0;
virtual void Reset()=0;
virtual void AddModifier(CWarp* mod); virtual void AddModifier(CWarp* mod);
}; };

View File

@ -36,6 +36,7 @@ public:
CLight GetLight() const; CLight GetLight() const;
bool GetParticleEmission() const; bool GetParticleEmission() const;
void DestroyParticles(); void DestroyParticles();
void Reset() {}
}; };
} }