summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2021-07-25 10:58:03 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2021-07-25 10:58:03 +0200
commitb69222e017560efb8abcff899a328e2879d271c7 (patch)
tree1ad242f91e9420f66531ca8758c899ac64d7e062 /src/core
parentMerge remote-tracking branch 'upstream/lcs' into lcs (diff)
downloadre3-b69222e017560efb8abcff899a328e2879d271c7.tar
re3-b69222e017560efb8abcff899a328e2879d271c7.tar.gz
re3-b69222e017560efb8abcff899a328e2879d271c7.tar.bz2
re3-b69222e017560efb8abcff899a328e2879d271c7.tar.lz
re3-b69222e017560efb8abcff899a328e2879d271c7.tar.xz
re3-b69222e017560efb8abcff899a328e2879d271c7.tar.zst
re3-b69222e017560efb8abcff899a328e2879d271c7.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/World.cpp14
-rw-r--r--src/core/World.h1
2 files changed, 15 insertions, 0 deletions
diff --git a/src/core/World.cpp b/src/core/World.cpp
index 8756049d..43af9f12 100644
--- a/src/core/World.cpp
+++ b/src/core/World.cpp
@@ -2294,3 +2294,17 @@ CWorld::IsWanderPathClear(CVector const& point1, CVector const& point2, float di
}
return true;
}
+
+void
+CWorld::CheckObjectsEffectedByFire(float x, float y, float z, float radius, CEntity* reason)
+{
+ int32 i = CPools::GetObjectPool()->GetSize();
+ while (i--) {
+ CObject* pObject = CPools::GetObjectPool()->GetSlot(i);
+ if (pObject) {
+ if (Abs(pObject->GetPosition().z - z) < 5.0f && Abs(pObject->GetPosition().x - x) < radius &&
+ Abs(pObject->GetPosition().y - y) < radius)
+ pObject->m_nLastWeaponToDamage = WEAPONTYPE_FLAMETHROWER;
+ }
+ }
+}
diff --git a/src/core/World.h b/src/core/World.h
index c90bb3a1..8da080b5 100644
--- a/src/core/World.h
+++ b/src/core/World.h
@@ -155,6 +155,7 @@ public:
static void TriggerExplosion(const CVector& position, float fRadius, float fPower, CEntity* pCreator, bool bProcessVehicleBombTimer);
static void TriggerExplosionSectorList(CPtrList& list, const CVector& position, float fRadius, float fPower, CEntity* pCreator, bool bProcessVehicleBombTimer);
static void UseDetonator(CEntity *pEntity);
+ static void CheckObjectsEffectedByFire(float, float, float, float, CEntity*);
// NB: following functions are unused (TODO?)
static void CastShadow(float, float, float, float);