diff options
author | blingu <36486731+blingu@users.noreply.github.com> | 2020-03-25 21:13:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-25 21:13:06 +0100 |
commit | 96802f9b95219bc7ea9869d0ec1178ff6d4193c3 (patch) | |
tree | 774591521aee1ecb7f494053505dedbd8aa77c82 /src/core | |
parent | renamed field_24 to m_nNextTimeToAddFlames (diff) | |
download | re3-96802f9b95219bc7ea9869d0ec1178ff6d4193c3.tar re3-96802f9b95219bc7ea9869d0ec1178ff6d4193c3.tar.gz re3-96802f9b95219bc7ea9869d0ec1178ff6d4193c3.tar.bz2 re3-96802f9b95219bc7ea9869d0ec1178ff6d4193c3.tar.lz re3-96802f9b95219bc7ea9869d0ec1178ff6d4193c3.tar.xz re3-96802f9b95219bc7ea9869d0ec1178ff6d4193c3.tar.zst re3-96802f9b95219bc7ea9869d0ec1178ff6d4193c3.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/Fire.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/Fire.cpp b/src/core/Fire.cpp index 95856a0f..e6756884 100644 --- a/src/core/Fire.cpp +++ b/src/core/Fire.cpp @@ -31,7 +31,7 @@ CFire::CFire() m_nExtinguishTime = 0; m_nStartTime = 0; field_20 = 1; - field_24 = 0; + m_nNextTimeToAddFlames = 0; m_fStrength = 0.8f; } @@ -95,8 +95,8 @@ CFire::ProcessFire(void) FindPlayerPed()->DoStuffToGoOnFire(); gFireManager.StartFire(FindPlayerPed(), m_pSource, 0.8f, 1); } - if (CTimer::m_snTimeInMilliseconds > field_24) { /* set to 0 when a newfire starts, related to time */ - field_24 = CTimer::m_snTimeInMilliseconds + 80; + if (CTimer::m_snTimeInMilliseconds > m_nNextTimeToAddFlames) { + m_nNextTimeToAddFlames = CTimer::m_snTimeInMilliseconds + 80; firePos = m_vecPos; if (veh && veh->IsVehicle() && veh->IsCar()) { @@ -122,7 +122,7 @@ CFire::ProcessFire(void) if (CTimer::m_snTimeInMilliseconds > m_nStartTime) m_nStartTime = CTimer::m_snTimeInMilliseconds + 400; - nRandNumber = CGeneral::GetRandomNumber(); + nRandNumber = CGeneral::GetRandomNumber() & 127; lightpos.x = m_vecPos.x; lightpos.y = m_vecPos.y; lightpos.z = m_vecPos.z + 5.0f; @@ -162,7 +162,7 @@ CFire::Extinguish(void) if (m_pEntity) { if (m_pEntity->IsPed()) { ((CPed *)m_pEntity)->RestorePreviousState(); - ((CPed *)m_pEntity)->m_pFire = 0; + ((CPed *)m_pEntity)->m_pFire = nil; } else if (m_pEntity->IsVehicle()) { ((CVehicle *)m_pEntity)->m_pCarFire = nil; } @@ -186,7 +186,7 @@ CFireManager::StartFire(CVector pos, float size, bool propagation) fire->m_nStartTime = CTimer::m_snTimeInMilliseconds + 400; fire->m_pEntity = nil; fire->m_pSource = nil; - fire->field_24 = 0; + fire->m_nNextTimeToAddFlames = 0; fire->ReportThisFire(); fire->m_fStrength = size; } |