re3-wiiu/src/peds/CivilianPed.cpp

27 lines
644 B
C++
Raw Normal View History

#include "common.h"
#include "patcher.h"
#include "CivilianPed.h"
2019-07-15 14:11:40 +02:00
#include "Phones.h"
WRAPPER void CCivilianPed::ProcessControl(void) { EAXJMP(0x4BFFE0); }
CCivilianPed::CCivilianPed(int pedtype, int mi) : CPed(pedtype)
{
2019-07-14 11:49:03 +02:00
SetModelIndex(mi);
2019-09-16 19:32:58 +02:00
for (int i = 0; i < 10; i++) {
m_nearPeds[i] = nil;
}
}
class CCivilianPed_ : public CCivilianPed
{
public:
CCivilianPed *ctor(int pedtype, int mi) { return ::new (this) CCivilianPed(pedtype, mi); };
void dtor(void) { CCivilianPed::~CCivilianPed(); }
};
STARTPATCHES
InjectHook(0x4BFF30, &CCivilianPed_::ctor, PATCH_JUMP);
InjectHook(0x4BFFC0, &CCivilianPed_::dtor, PATCH_JUMP);
ENDPATCHES