summaryrefslogtreecommitdiffstats
path: root/src/objects/ParticleObject.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2019-08-25 15:48:13 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2019-08-25 15:48:13 +0200
commit16624e174bc8c9e53a59f392b159b529e11ef82c (patch)
tree4c8a2131d5e58f3da2e2586c201855c01ada14b0 /src/objects/ParticleObject.cpp
parentmore CCarCtrl (diff)
parentMerge pull request #196 from erorcun/erorcun (diff)
downloadre3-16624e174bc8c9e53a59f392b159b529e11ef82c.tar
re3-16624e174bc8c9e53a59f392b159b529e11ef82c.tar.gz
re3-16624e174bc8c9e53a59f392b159b529e11ef82c.tar.bz2
re3-16624e174bc8c9e53a59f392b159b529e11ef82c.tar.lz
re3-16624e174bc8c9e53a59f392b159b529e11ef82c.tar.xz
re3-16624e174bc8c9e53a59f392b159b529e11ef82c.tar.zst
re3-16624e174bc8c9e53a59f392b159b529e11ef82c.zip
Diffstat (limited to 'src/objects/ParticleObject.cpp')
-rw-r--r--src/objects/ParticleObject.cpp8
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 )
{