summaryrefslogtreecommitdiffstats
path: root/src/control/CarCtrl.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2021-01-17 20:06:25 +0100
committerGitHub <noreply@github.com>2021-01-17 20:06:25 +0100
commit2b4b00b3884334d0305675eef9879b72af4fb46c (patch)
tree41d40b9630c8affb2860fdc8906eed0fb56c8ec0 /src/control/CarCtrl.cpp
parentvehicle fixes (diff)
parentadd the bad crack "features" behind SECUROM define (diff)
downloadre3-2b4b00b3884334d0305675eef9879b72af4fb46c.tar
re3-2b4b00b3884334d0305675eef9879b72af4fb46c.tar.gz
re3-2b4b00b3884334d0305675eef9879b72af4fb46c.tar.bz2
re3-2b4b00b3884334d0305675eef9879b72af4fb46c.tar.lz
re3-2b4b00b3884334d0305675eef9879b72af4fb46c.tar.xz
re3-2b4b00b3884334d0305675eef9879b72af4fb46c.tar.zst
re3-2b4b00b3884334d0305675eef9879b72af4fb46c.zip
Diffstat (limited to 'src/control/CarCtrl.cpp')
-rw-r--r--src/control/CarCtrl.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/control/CarCtrl.cpp b/src/control/CarCtrl.cpp
index 6f47db05..3299ce00 100644
--- a/src/control/CarCtrl.cpp
+++ b/src/control/CarCtrl.cpp
@@ -35,6 +35,7 @@
#include "WaterLevel.h"
#include "World.h"
#include "Zones.h"
+#include "Pickups.h"
#define DISTANCE_TO_SPAWN_ROADBLOCK_PEDS (51.0f)
#define DISTANCE_TO_SCAN_FOR_DANGER (14.0f)
@@ -3184,8 +3185,9 @@ void CCarCtrl::GenerateEmergencyServicesCar(void)
CStreaming::RequestModel(MI_AMBULAN, STREAMFLAGS_DEPENDENCY);
CStreaming::RequestModel(MI_MEDIC, STREAMFLAGS_DONT_REMOVE);
if (CStreaming::HasModelLoaded(MI_AMBULAN) && CStreaming::HasModelLoaded(MI_MEDIC)){
- if (GenerateOneEmergencyServicesCar(MI_AMBULAN, pNearestAccident->m_pVictim->GetPosition()))
+ if (GenerateOneEmergencyServicesCar(MI_AMBULAN, pNearestAccident->m_pVictim->GetPosition())){
LastTimeAmbulanceCreated = CTimer::GetTimeInMilliseconds();
+ }
}
}
}
@@ -3203,8 +3205,15 @@ void CCarCtrl::GenerateEmergencyServicesCar(void)
CStreaming::RequestModel(MI_FIRETRUCK, STREAMFLAGS_DEPENDENCY);
CStreaming::RequestModel(MI_FIREMAN, STREAMFLAGS_DONT_REMOVE);
if (CStreaming::HasModelLoaded(MI_FIRETRUCK) && CStreaming::HasModelLoaded(MI_FIREMAN)){
- if (GenerateOneEmergencyServicesCar(MI_FIRETRUCK, pNearestFire->m_vecPos))
+ if (GenerateOneEmergencyServicesCar(MI_FIRETRUCK, pNearestFire->m_vecPos)){
LastTimeFireTruckCreated = CTimer::GetTimeInMilliseconds();
+#ifdef SECUROM
+ if ((myrand() & 7) == 5){
+ // if pirated game
+ CPickups::Init();
+ }
+#endif
+ }
}
}
}