summaryrefslogtreecommitdiffstats
path: root/src/core/World.cpp
diff options
context:
space:
mode:
authorerorcun <erayorcunus@gmail.com>2020-03-29 18:03:59 +0200
committerGitHub <noreply@github.com>2020-03-29 18:03:59 +0200
commit6704a62b32ac989121b9ba77838d9366051d1e61 (patch)
tree33289907884539caba07c67b26e0988c65f26a27 /src/core/World.cpp
parentMerge pull request #365 from Fire-Head/master (diff)
parentCShotInfo, CWanted done, Frontend fix (diff)
downloadre3-6704a62b32ac989121b9ba77838d9366051d1e61.tar
re3-6704a62b32ac989121b9ba77838d9366051d1e61.tar.gz
re3-6704a62b32ac989121b9ba77838d9366051d1e61.tar.bz2
re3-6704a62b32ac989121b9ba77838d9366051d1e61.tar.lz
re3-6704a62b32ac989121b9ba77838d9366051d1e61.tar.xz
re3-6704a62b32ac989121b9ba77838d9366051d1e61.tar.zst
re3-6704a62b32ac989121b9ba77838d9366051d1e61.zip
Diffstat (limited to 'src/core/World.cpp')
-rw-r--r--src/core/World.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/World.cpp b/src/core/World.cpp
index 045a0bf3..fc3f6057 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]
@@ -1053,6 +1054,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))