From 39223901bf459e0548605f64ae030e89fedb9949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Sat, 17 Aug 2019 22:03:57 +0300 Subject: AnimViewer messages, Particle fix, Peds --- src/objects/ParticleObject.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/objects/ParticleObject.cpp') diff --git a/src/objects/ParticleObject.cpp b/src/objects/ParticleObject.cpp index 32d305c6..2171cd76 100644 --- a/src/objects/ParticleObject.cpp +++ b/src/objects/ParticleObject.cpp @@ -442,13 +442,13 @@ void CParticleObject::UpdateClose(void) { this->m_nFrameCounter = 0; - int32 randVal; // BUG: unitialised can be used ??!! + int32 randVal; if ( this->m_nCreationChance != 0 ) randVal = CGeneral::GetRandomNumber() % this->m_nCreationChance; - if ( randVal != 0 && this->m_nCreationChance > 0 - || randVal == 0 && (this->m_nCreationChance & 128) != 0 - || this->m_nCreationChance == 0 ) + if ( this->m_nCreationChance == 0 + || randVal == 0 && this->m_nCreationChance < 0 + || randVal != 0 && this->m_nCreationChance > 0) { switch ( this->m_Type ) { -- cgit v1.2.3