summaryrefslogtreecommitdiffstats
path: root/src/peds/EmergencyPed.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2019-07-17 15:13:00 +0200
committereray orçunus <erayorcunus@gmail.com>2019-07-17 15:13:00 +0200
commit06ed308bb1a2383125cf04fd712b1753c4ba1d55 (patch)
tree713a8e10b3657d4c3a0d9c20c3704e0da8f9357e /src/peds/EmergencyPed.cpp
parentMerge branch 'master' of git://github.com/GTAmodding/re3 into erorcun (diff)
parentrenamed some variables and added files; more CAutomobile::ProcessControl (diff)
downloadre3-06ed308bb1a2383125cf04fd712b1753c4ba1d55.tar
re3-06ed308bb1a2383125cf04fd712b1753c4ba1d55.tar.gz
re3-06ed308bb1a2383125cf04fd712b1753c4ba1d55.tar.bz2
re3-06ed308bb1a2383125cf04fd712b1753c4ba1d55.tar.lz
re3-06ed308bb1a2383125cf04fd712b1753c4ba1d55.tar.xz
re3-06ed308bb1a2383125cf04fd712b1753c4ba1d55.tar.zst
re3-06ed308bb1a2383125cf04fd712b1753c4ba1d55.zip
Diffstat (limited to '')
-rw-r--r--src/peds/EmergencyPed.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/peds/EmergencyPed.cpp b/src/peds/EmergencyPed.cpp
index 664bd6f6..cbcfb403 100644
--- a/src/peds/EmergencyPed.cpp
+++ b/src/peds/EmergencyPed.cpp
@@ -1,13 +1,38 @@
#include "common.h"
#include "patcher.h"
#include "EmergencyPed.h"
+#include "ModelIndices.h"
class CEmergencyPed_ : public CEmergencyPed
{
public:
+ CEmergencyPed *ctor(int pedtype) { return ::new (this) CEmergencyPed(pedtype); };
void dtor(void) { CEmergencyPed::~CEmergencyPed(); }
};
+WRAPPER void CEmergencyPed::ProcessControl(void) { EAXJMP(0x4C2F10); }
+
+CEmergencyPed::CEmergencyPed(uint32 type) : CPed(type)
+{
+ switch (type){
+ case PEDTYPE_EMERGENCY:
+ SetModelIndex(MI_MEDIC);
+ m_pRevivedPed = nil;
+ field_1360 = 0;
+ break;
+ case PEDTYPE_FIREMAN:
+ SetModelIndex(MI_FIREMAN);
+ m_pRevivedPed = nil;
+ break;
+ default:
+ break;
+ }
+ m_nEmergencyPedState = 0;
+ m_pAttendedAccident = nil;
+ field_1356 = 0;
+}
+
STARTPATCHES
+ InjectHook(0x4C2E40, &CEmergencyPed_::ctor, PATCH_JUMP);
InjectHook(0x4C2EF0, &CEmergencyPed_::dtor, PATCH_JUMP);
ENDPATCHES