summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-07-17 13:19:20 +0200
committeraap <aap@papnet.eu>2019-07-17 13:19:20 +0200
commit0f1fbf5e9a7477c6fbb7645491598e87ed2e183e (patch)
tree713a8e10b3657d4c3a0d9c20c3704e0da8f9357e /src/control
parentMerge pull request #139 from Nick007J/master (diff)
downloadre3-0f1fbf5e9a7477c6fbb7645491598e87ed2e183e.tar
re3-0f1fbf5e9a7477c6fbb7645491598e87ed2e183e.tar.gz
re3-0f1fbf5e9a7477c6fbb7645491598e87ed2e183e.tar.bz2
re3-0f1fbf5e9a7477c6fbb7645491598e87ed2e183e.tar.lz
re3-0f1fbf5e9a7477c6fbb7645491598e87ed2e183e.tar.xz
re3-0f1fbf5e9a7477c6fbb7645491598e87ed2e183e.tar.zst
re3-0f1fbf5e9a7477c6fbb7645491598e87ed2e183e.zip
Diffstat (limited to 'src/control')
-rw-r--r--src/control/CarAI.cpp5
-rw-r--r--src/control/CarAI.h9
-rw-r--r--src/control/CarCtrl.cpp2
-rw-r--r--src/control/CarCtrl.h2
-rw-r--r--src/control/Garages.cpp2
-rw-r--r--src/control/Garages.h1
-rw-r--r--src/control/Population.cpp1
-rw-r--r--src/control/Population.h1
-rw-r--r--src/control/Remote.cpp5
-rw-r--r--src/control/Remote.h7
-rw-r--r--src/control/Script.cpp2
11 files changed, 36 insertions, 1 deletions
diff --git a/src/control/CarAI.cpp b/src/control/CarAI.cpp
new file mode 100644
index 00000000..92dc5ab9
--- /dev/null
+++ b/src/control/CarAI.cpp
@@ -0,0 +1,5 @@
+#include "common.h"
+#include "patcher.h"
+#include "CarAI.h"
+
+WRAPPER void CCarAI::UpdateCarAI(CVehicle*) { EAXJMP(0x413E50); }
diff --git a/src/control/CarAI.h b/src/control/CarAI.h
new file mode 100644
index 00000000..d463e1a9
--- /dev/null
+++ b/src/control/CarAI.h
@@ -0,0 +1,9 @@
+#pragma once
+
+class CVehicle;
+
+class CCarAI
+{
+public:
+ static void UpdateCarAI(CVehicle*);
+};
diff --git a/src/control/CarCtrl.cpp b/src/control/CarCtrl.cpp
index 8c2ee76c..7acfa64a 100644
--- a/src/control/CarCtrl.cpp
+++ b/src/control/CarCtrl.cpp
@@ -14,3 +14,5 @@ WRAPPER void CCarCtrl::UpdateCarCount(CVehicle*, bool) { EAXJMP(0x4202E0); }
WRAPPER int32 CCarCtrl::ChooseCarModel(int32 vehclass) { EAXJMP(0x418110); }
WRAPPER bool CCarCtrl::JoinCarWithRoadSystemGotoCoors(CVehicle*, CVector, bool) { EAXJMP(0x41FA00); }
WRAPPER void CCarCtrl::JoinCarWithRoadSystem(CVehicle*) { EAXJMP(0x41F820); }
+WRAPPER void CCarCtrl::SteerAICarWithPhysics(CVehicle*) { EAXJMP(0x41DA60); }
+WRAPPER void CCarCtrl::UpdateCarOnRails(CVehicle*) { EAXJMP(0x418880); }
diff --git a/src/control/CarCtrl.h b/src/control/CarCtrl.h
index 1fe3c31e..a15279d3 100644
--- a/src/control/CarCtrl.h
+++ b/src/control/CarCtrl.h
@@ -11,6 +11,8 @@ public:
static int32 ChooseCarModel(int32 vehclass);
static bool JoinCarWithRoadSystemGotoCoors(CVehicle*, CVector, bool);
static void JoinCarWithRoadSystem(CVehicle*);
+ static void SteerAICarWithPhysics(CVehicle*);
+ static void UpdateCarOnRails(CVehicle*);
static int32 &NumLawEnforcerCars;
static int32 &NumAmbulancesOnDuty;
diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp
index d601db8e..acc2b459 100644
--- a/src/control/Garages.cpp
+++ b/src/control/Garages.cpp
@@ -63,6 +63,8 @@ CGarages::IsModelIndexADoor(uint32 id)
id == MI_CRUSHERLID;
}
+WRAPPER void CGarages::TriggerMessage(char *text, int16, uint16 time, int16) { EAXJMP(0x426B20); }
+
#if 0
WRAPPER void CGarages::PrintMessages(void) { EAXJMP(0x426310); }
#else
diff --git a/src/control/Garages.h b/src/control/Garages.h
index f018401c..69f9d256 100644
--- a/src/control/Garages.h
+++ b/src/control/Garages.h
@@ -22,5 +22,6 @@ public:
public:
static bool IsModelIndexADoor(uint32 id);
+ static void TriggerMessage(char *text, int16, uint16 time, int16);
static void PrintMessages(void);
};
diff --git a/src/control/Population.cpp b/src/control/Population.cpp
index 72de300d..31c475f0 100644
--- a/src/control/Population.cpp
+++ b/src/control/Population.cpp
@@ -12,3 +12,4 @@ uint32 &CPopulation::ms_nTotalMissionPeds = *(uint32*)0x8F5F70;
WRAPPER void CPopulation::UpdatePedCount(uint32, bool) { EAXJMP(0x4F5A60); }
WRAPPER void CPopulation::DealWithZoneChange(eLevelName oldLevel, eLevelName newLevel, bool) { EAXJMP(0x4F6200); }
WRAPPER CPed *CPopulation::AddPedInCar(CVehicle *vehicle) { EAXJMP(0x4F5800); }
+WRAPPER bool CPopulation::IsPointInSafeZone(CVector *coors) { EAXJMP(0x4F60C0); }
diff --git a/src/control/Population.h b/src/control/Population.h
index e24ace3a..cfa9508f 100644
--- a/src/control/Population.h
+++ b/src/control/Population.h
@@ -20,4 +20,5 @@ public:
static void UpdatePedCount(uint32, bool);
static void DealWithZoneChange(eLevelName oldLevel, eLevelName newLevel, bool);
static CPed *AddPedInCar(CVehicle *vehicle);
+ static bool IsPointInSafeZone(CVector *coors);
};
diff --git a/src/control/Remote.cpp b/src/control/Remote.cpp
new file mode 100644
index 00000000..8d8d08f2
--- /dev/null
+++ b/src/control/Remote.cpp
@@ -0,0 +1,5 @@
+#include "common.h"
+#include "patcher.h"
+#include "Remote.h"
+
+WRAPPER void CRemote::TakeRemoteControlledCarFromPlayer(void) { EAXJMP(0x435DA0); }
diff --git a/src/control/Remote.h b/src/control/Remote.h
new file mode 100644
index 00000000..f8ef96bf
--- /dev/null
+++ b/src/control/Remote.h
@@ -0,0 +1,7 @@
+#pragma once
+
+class CRemote
+{
+public:
+ static void TakeRemoteControlledCarFromPlayer(void);
+};
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index 5e9f51af..85e27956 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -2050,7 +2050,7 @@ int8 CRunningScript::ProcessCommandsFrom100To199(int32 command)
CollectParameters(&m_nIp, 2);
CVehicle* car = CPools::GetVehiclePool()->GetAt(ScriptParams[0]);
assert(car);
- car->AutoPilot.m_nCruiseSpeed = min(*(float*)&ScriptParams[1], 60.0f * car->m_handling->TransmissionData.fUnkMaxVelocity);
+ car->AutoPilot.m_nCruiseSpeed = min(*(float*)&ScriptParams[1], 60.0f * car->pHandling->Transmission.fUnkMaxVelocity);
return 0;
}
case COMMAND_SET_CAR_DRIVING_STYLE: