summaryrefslogtreecommitdiffstats
path: root/src/objects/Object.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/objects/Object.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/objects/Object.cpp')
-rw-r--r--src/objects/Object.cpp21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/objects/Object.cpp b/src/objects/Object.cpp
index 6712d77b..f3ba8087 100644
--- a/src/objects/Object.cpp
+++ b/src/objects/Object.cpp
@@ -7,8 +7,10 @@
#include "Object.h"
WRAPPER void CObject::ObjectDamage(float amount) { EAXJMP(0x4BB240); }
+WRAPPER void CObject::DeleteAllTempObjectInArea(CVector, float) { EAXJMP(0x4BBED0); }
int16 &CObject::nNoTempObjects = *(int16*)0x95CCA2;
+int16 &CObject::nBodyCastHealth = *(int16*)0x5F7D4C; // 1000
void *CObject::operator new(size_t sz) { return CPools::GetObjectPool()->New(); }
void CObject::operator delete(void *p, size_t sz) { CPools::GetObjectPool()->Delete((CObject*)p); }
@@ -85,9 +87,22 @@ CObject::RemoveLighting(bool reset)
WorldReplaceScorchedLightsWithNormal(Scene.world);
}
-WRAPPER void CObject::DeleteAllTempObjectInArea(CVector, float) { EAXJMP(0x4BBED0); }
+
+void
+CObject::RefModelInfo(int32 modelId)
+{
+ m_nRefModelIndex = modelId;
+ CModelInfo::GetModelInfo(modelId)->AddRef();
+}
+
+class CObject_ : public CObject
+{
+public:
+ void dtor(void) { this->CObject::~CObject(); }
+ void Render_(void) { CObject::Render(); }
+};
STARTPATCHES
- InjectHook(0x4BAE00, &CObject::dtor, PATCH_JUMP);
- InjectHook(0x4BB1E0, &CObject::Render_, PATCH_JUMP);
+ InjectHook(0x4BAE00, &CObject_::dtor, PATCH_JUMP);
+ InjectHook(0x4BB1E0, &CObject_::Render_, PATCH_JUMP);
ENDPATCHES