summaryrefslogtreecommitdiffstats
path: root/src/core/World.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2019-10-21 23:39:59 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2019-10-21 23:39:59 +0200
commitd579ee1b64677a425f64a06629bb1a4dcee382ff (patch)
tree501b60f177b68fda115f568a1e8ee0c367cba484 /src/core/World.cpp
parentMoved CCutsceneMgr::ms_cutsceneProcessing to private (diff)
downloadre3-d579ee1b64677a425f64a06629bb1a4dcee382ff.tar
re3-d579ee1b64677a425f64a06629bb1a4dcee382ff.tar.gz
re3-d579ee1b64677a425f64a06629bb1a4dcee382ff.tar.bz2
re3-d579ee1b64677a425f64a06629bb1a4dcee382ff.tar.lz
re3-d579ee1b64677a425f64a06629bb1a4dcee382ff.tar.xz
re3-d579ee1b64677a425f64a06629bb1a4dcee382ff.tar.zst
re3-d579ee1b64677a425f64a06629bb1a4dcee382ff.zip
Diffstat (limited to 'src/core/World.cpp')
-rw-r--r--src/core/World.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/core/World.cpp b/src/core/World.cpp
index 3a8367f1..fc54caf9 100644
--- a/src/core/World.cpp
+++ b/src/core/World.cpp
@@ -997,6 +997,19 @@ CWorld::RemoveFallenCars(void)
}
void
+CWorld::StopAllLawEnforcersInTheirTracks(void)
+{
+ int poolSize = CPools::GetVehiclePool()->GetSize();
+ for (int poolIndex = poolSize - 1; poolIndex >= 0; poolIndex--) {
+ CVehicle* veh = CPools::GetVehiclePool()->GetSlot(poolIndex);
+ if (veh) {
+ if (veh->bIsLawEnforcer)
+ veh->SetMoveSpeed(0.0f, 0.0f, 0.0f);
+ }
+ }
+}
+
+void
CWorld::Process(void)
{
if (!(CTimer::GetFrameCounter() & 63))