summaryrefslogtreecommitdiffstats
path: root/src/peds/EmergencyPed.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2019-07-14 11:49:03 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2019-07-14 11:49:03 +0200
commit41dbd754dee344c79207e0821df6bcc262f90726 (patch)
treee80d10adead90967de74b488a8253d2d3343be73 /src/peds/EmergencyPed.cpp
parentfixed policeDontCare (diff)
downloadre3-41dbd754dee344c79207e0821df6bcc262f90726.tar
re3-41dbd754dee344c79207e0821df6bcc262f90726.tar.gz
re3-41dbd754dee344c79207e0821df6bcc262f90726.tar.bz2
re3-41dbd754dee344c79207e0821df6bcc262f90726.tar.lz
re3-41dbd754dee344c79207e0821df6bcc262f90726.tar.xz
re3-41dbd754dee344c79207e0821df6bcc262f90726.tar.zst
re3-41dbd754dee344c79207e0821df6bcc262f90726.zip
Diffstat (limited to '')
-rw-r--r--src/peds/EmergencyPed.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/peds/EmergencyPed.cpp b/src/peds/EmergencyPed.cpp
index 664bd6f6..d4f46b0e 100644
--- a/src/peds/EmergencyPed.cpp
+++ b/src/peds/EmergencyPed.cpp
@@ -1,13 +1,36 @@
#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(); }
};
+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