diff options
author | erorcun <erayorcunus@gmail.com> | 2019-10-30 01:20:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-30 01:20:15 +0100 |
commit | 34090ab4d6c0d23d3955e8f85d8d97a2887af838 (patch) | |
tree | 7aaf5fd5359ad3f93ee2ee6e194d507c1d87c64a /src/core/World.cpp | |
parent | CRadar::Initialise() + fixes (diff) | |
parent | fix pager build (diff) | |
download | re3-34090ab4d6c0d23d3955e8f85d8d97a2887af838.tar re3-34090ab4d6c0d23d3955e8f85d8d97a2887af838.tar.gz re3-34090ab4d6c0d23d3955e8f85d8d97a2887af838.tar.bz2 re3-34090ab4d6c0d23d3955e8f85d8d97a2887af838.tar.lz re3-34090ab4d6c0d23d3955e8f85d8d97a2887af838.tar.xz re3-34090ab4d6c0d23d3955e8f85d8d97a2887af838.tar.zst re3-34090ab4d6c0d23d3955e8f85d8d97a2887af838.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/World.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/core/World.cpp b/src/core/World.cpp index 5dea09bd..ae0d67cc 100644 --- a/src/core/World.cpp +++ b/src/core/World.cpp @@ -999,6 +999,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)) |