2019-06-30 10:59:55 +00:00
|
|
|
#include "common.h"
|
|
|
|
#include "patcher.h"
|
|
|
|
#include "EmergencyPed.h"
|
2019-07-14 09:49:03 +00:00
|
|
|
#include "ModelIndices.h"
|
2019-06-30 10:59:55 +00:00
|
|
|
|
2019-07-08 06:46:42 +00:00
|
|
|
class CEmergencyPed_ : public CEmergencyPed
|
|
|
|
{
|
|
|
|
public:
|
2019-07-14 09:49:03 +00:00
|
|
|
CEmergencyPed *ctor(int pedtype) { return ::new (this) CEmergencyPed(pedtype); };
|
2019-07-08 06:46:42 +00:00
|
|
|
void dtor(void) { CEmergencyPed::~CEmergencyPed(); }
|
|
|
|
};
|
|
|
|
|
2019-07-14 12:00:36 +00:00
|
|
|
WRAPPER void CEmergencyPed::ProcessControl(void) { EAXJMP(0x4C2F10); }
|
|
|
|
|
2019-07-14 09:49:03 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2019-06-30 10:59:55 +00:00
|
|
|
STARTPATCHES
|
2019-07-14 09:49:03 +00:00
|
|
|
InjectHook(0x4C2E40, &CEmergencyPed_::ctor, PATCH_JUMP);
|
2019-07-08 06:46:42 +00:00
|
|
|
InjectHook(0x4C2EF0, &CEmergencyPed_::dtor, PATCH_JUMP);
|
|
|
|
ENDPATCHES
|