summaryrefslogtreecommitdiffstats
path: root/src/render/Instance.cpp
diff options
context:
space:
mode:
authorsaml1er <danishroar@gmail.com>2020-04-16 21:01:53 +0200
committersaml1er <danishroar@gmail.com>2020-04-16 21:01:53 +0200
commite52a02fb9e1dd5602e80d88691f2ee2291d1fa52 (patch)
tree333caa1599e2f0c6b91bdae2092cf085eaf8238a /src/render/Instance.cpp
parentReverse CWorld (diff)
parentMore refs removed (diff)
downloadre3-e52a02fb9e1dd5602e80d88691f2ee2291d1fa52.tar
re3-e52a02fb9e1dd5602e80d88691f2ee2291d1fa52.tar.gz
re3-e52a02fb9e1dd5602e80d88691f2ee2291d1fa52.tar.bz2
re3-e52a02fb9e1dd5602e80d88691f2ee2291d1fa52.tar.lz
re3-e52a02fb9e1dd5602e80d88691f2ee2291d1fa52.tar.xz
re3-e52a02fb9e1dd5602e80d88691f2ee2291d1fa52.tar.zst
re3-e52a02fb9e1dd5602e80d88691f2ee2291d1fa52.zip
Diffstat (limited to 'src/render/Instance.cpp')
-rw-r--r--src/render/Instance.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/render/Instance.cpp b/src/render/Instance.cpp
new file mode 100644
index 00000000..775341be
--- /dev/null
+++ b/src/render/Instance.cpp
@@ -0,0 +1,20 @@
+#include "common.h"
+#include "patcher.h"
+#include "Instance.h"
+
+void
+CInstance::Shutdown()
+{
+ GetMatrix().Detach();
+}
+
+class CInstance_ : public CInstance
+{
+public:
+ void dtor() { CInstance::~CInstance(); }
+};
+
+STARTPATCHES
+ InjectHook(0x50BE90, &CInstance_::dtor, PATCH_JUMP);
+ InjectHook(0x50B850, &CInstance::Shutdown, PATCH_JUMP);
+ENDPATCHES