summaryrefslogtreecommitdiff
path: root/src/peds/CivilianPed.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/peds/CivilianPed.cpp')
-rw-r--r--src/peds/CivilianPed.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/peds/CivilianPed.cpp b/src/peds/CivilianPed.cpp
index a4881e71..cf8a0580 100644
--- a/src/peds/CivilianPed.cpp
+++ b/src/peds/CivilianPed.cpp
@@ -13,7 +13,14 @@ CCivilianPed::CCivilianPed(int pedtype, int mi) : CPed(pedtype)
}
}
+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 \ No newline at end of file
+ InjectHook(0x4BFF30, &CCivilianPed_::ctor, PATCH_JUMP);
+ InjectHook(0x4BFFC0, &CCivilianPed_::dtor, PATCH_JUMP);
+ENDPATCHES