CParticleGlobals: Initialize all data members

Provides a deterministic initial state.
This commit is contained in:
Lioncash 2020-04-11 20:23:38 -04:00
parent 9d6b9142bb
commit 7d42b2d763
1 changed files with 3 additions and 2 deletions

View File

@ -13,8 +13,9 @@
namespace urde {
class CElementGen;
class CParticleGlobals {
CParticleGlobals()=default;
CParticleGlobals() = default;
static std::unique_ptr<CParticleGlobals> g_ParticleGlobals;
public:
int m_EmitterTime = 0;
float m_EmitterTimeReal = 0.f;
@ -48,7 +49,7 @@ public:
CElementGen* x4_system;
};
SParticleSystem* m_currentParticleSystem;
SParticleSystem* m_currentParticleSystem = nullptr;
static CParticleGlobals* instance() {
if (!g_ParticleGlobals)