diff options
author | eray orçunus <erayorcunus@gmail.com> | 2020-03-29 18:26:23 +0300 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2020-03-29 19:02:26 +0300 |
commit | a3b519ea6420ea6fb7fbd35cd25fbc329fab5086 (patch) | |
tree | 02ce17141daf511a93118c65889b5832032e0d16 /src/core/World.cpp | |
parent | 39c9a0582700ab7242272952edbe211a4dd13935 (diff) |
CShotInfo, CWanted done, Frontend fix
Diffstat (limited to 'src/core/World.cpp')
-rw-r--r-- | src/core/World.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/World.cpp b/src/core/World.cpp index 1dda1056..7913589e 100644 --- a/src/core/World.cpp +++ b/src/core/World.cpp @@ -19,6 +19,7 @@ #include "Messages.h" #include "Replay.h" #include "Population.h" +#include "Fire.h" CColPoint *gaTempSphereColPoints = (CColPoint*)0x6E64C0; // [32] @@ -1052,6 +1053,19 @@ CWorld::ExtinguishAllCarFiresInArea(CVector point, float range) } void +CWorld::SetCarsOnFire(float x, float y, float z, float radius, CEntity *reason) +{ + int poolSize = CPools::GetVehiclePool()->GetSize(); + for (int poolIndex = poolSize - 1; poolIndex >= 0; poolIndex--) { + CVehicle *veh = CPools::GetVehiclePool()->GetSlot(poolIndex); + if (veh && veh->m_status != STATUS_WRECKED && !veh->m_pCarFire && !veh->bFireProof) { + if (Abs(veh->GetPosition().z - z) < 5.0f && Abs(veh->GetPosition().x - x) < radius && Abs(veh->GetPosition().y - y) < radius) + gFireManager.StartFire(veh, reason, 0.8f, true); + } + } +} + +void CWorld::Process(void) { if (!(CTimer::GetFrameCounter() & 63)) |