diff options
author | aap <aap@papnet.eu> | 2019-08-17 21:24:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-17 21:24:26 +0200 |
commit | ed9ab6c55f5316baa7ce420a682097fcfe8afb05 (patch) | |
tree | c05b0093155e8d7a76646cee93a50429430b3b54 /src/objects | |
parent | Merge pull request #194 from Nick007J/master (diff) | |
parent | AnimViewer messages, Particle fix, Peds (diff) | |
download | re3-ed9ab6c55f5316baa7ce420a682097fcfe8afb05.tar re3-ed9ab6c55f5316baa7ce420a682097fcfe8afb05.tar.gz re3-ed9ab6c55f5316baa7ce420a682097fcfe8afb05.tar.bz2 re3-ed9ab6c55f5316baa7ce420a682097fcfe8afb05.tar.lz re3-ed9ab6c55f5316baa7ce420a682097fcfe8afb05.tar.xz re3-ed9ab6c55f5316baa7ce420a682097fcfe8afb05.tar.zst re3-ed9ab6c55f5316baa7ce420a682097fcfe8afb05.zip |
Diffstat (limited to 'src/objects')
-rw-r--r-- | src/objects/ParticleObject.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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 ) { |