summaryrefslogtreecommitdiffstats
path: root/src/objects
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2019-08-17 21:03:57 +0200
committereray orçunus <erayorcunus@gmail.com>2019-08-17 21:21:10 +0200
commit39223901bf459e0548605f64ae030e89fedb9949 (patch)
treeccd55f366d0b2a42b6746bf89017cb05139570e9 /src/objects
parentMerge pull request #193 from erorcun/erorcun (diff)
downloadre3-39223901bf459e0548605f64ae030e89fedb9949.tar
re3-39223901bf459e0548605f64ae030e89fedb9949.tar.gz
re3-39223901bf459e0548605f64ae030e89fedb9949.tar.bz2
re3-39223901bf459e0548605f64ae030e89fedb9949.tar.lz
re3-39223901bf459e0548605f64ae030e89fedb9949.tar.xz
re3-39223901bf459e0548605f64ae030e89fedb9949.tar.zst
re3-39223901bf459e0548605f64ae030e89fedb9949.zip
Diffstat (limited to 'src/objects')
-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 )
{