summaryrefslogtreecommitdiffstats
path: root/src/objects/Object.cpp
diff options
context:
space:
mode:
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