summaryrefslogtreecommitdiffstats
path: root/src/core/Placeable.cpp
diff options
context:
space:
mode:
authorFire_Head <Fire-Head@users.noreply.github.com>2019-07-11 02:48:36 +0200
committerGitHub <noreply@github.com>2019-07-11 02:48:36 +0200
commitaa449b6fe162d8960351c5fe164a9120b8572652 (patch)
treefa82496d356ac2b77ffa1ab00684b0150907f009 /src/core/Placeable.cpp
parentfixfixfix (diff)
parentMerge pull request #129 from erorcun/erorcun (diff)
downloadre3-aa449b6fe162d8960351c5fe164a9120b8572652.tar
re3-aa449b6fe162d8960351c5fe164a9120b8572652.tar.gz
re3-aa449b6fe162d8960351c5fe164a9120b8572652.tar.bz2
re3-aa449b6fe162d8960351c5fe164a9120b8572652.tar.lz
re3-aa449b6fe162d8960351c5fe164a9120b8572652.tar.xz
re3-aa449b6fe162d8960351c5fe164a9120b8572652.tar.zst
re3-aa449b6fe162d8960351c5fe164a9120b8572652.zip
Diffstat (limited to 'src/core/Placeable.cpp')
-rw-r--r--src/core/Placeable.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/core/Placeable.cpp b/src/core/Placeable.cpp
index b4b2a37b..c1fe705e 100644
--- a/src/core/Placeable.cpp
+++ b/src/core/Placeable.cpp
@@ -63,9 +63,17 @@ CPlaceable::IsWithinArea(float x1, float y1, float z1, float x2, float y2, float
z1 <= GetPosition().z && GetPosition().z <= z2;
}
+class CPlaceable_ : public CPlaceable
+{
+public:
+ CPlaceable *ctor(void) { return ::new (this) CPlaceable(); }
+ void dtor(void) { CPlaceable::~CPlaceable(); }
+};
+
STARTPATCHES
- InjectHook(0x49F9A0, &CPlaceable::ctor, PATCH_JUMP);
- InjectHook(0x49F9E0, &CPlaceable::dtor, PATCH_JUMP);
+ InjectHook(0x49F9A0, &CPlaceable_::ctor, PATCH_JUMP);
+ InjectHook(0x49F9E0, &CPlaceable_::dtor, PATCH_JUMP);
+
InjectHook(0x49FA00, &CPlaceable::SetHeading, PATCH_JUMP);
InjectHook(0x49FA50, (bool (CPlaceable::*)(float, float, float, float))&CPlaceable::IsWithinArea, PATCH_JUMP);
InjectHook(0x49FAF0, (bool (CPlaceable::*)(float, float, float, float, float, float))&CPlaceable::IsWithinArea, PATCH_JUMP);