summaryrefslogtreecommitdiff
path: root/src/peds/CivilianPed.cpp
diff options
context:
space:
mode:
authorFire_Head <Fire-Head@users.noreply.github.com>2019-07-11 03:48:36 +0300
committerGitHub <noreply@github.com>2019-07-11 03:48:36 +0300
commitaa449b6fe162d8960351c5fe164a9120b8572652 (patch)
treefa82496d356ac2b77ffa1ab00684b0150907f009 /src/peds/CivilianPed.cpp
parentd8dd649617d4583e43f58a774ad4faf20015934e (diff)
parentf35b053684501805f90529f0d2426ee8d7c593fe (diff)
Merge branch 'master' into master
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