summaryrefslogtreecommitdiffstats
path: root/src/objects
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2019-07-25 22:34:29 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2019-07-25 22:34:29 +0200
commit5acce16261606f06e39e09d0bd6ec0d95787ae38 (patch)
treed3b6a483930067302386dc3284dbd68326432bf3 /src/objects
parentfixed dinput (diff)
downloadre3-5acce16261606f06e39e09d0bd6ec0d95787ae38.tar
re3-5acce16261606f06e39e09d0bd6ec0d95787ae38.tar.gz
re3-5acce16261606f06e39e09d0bd6ec0d95787ae38.tar.bz2
re3-5acce16261606f06e39e09d0bd6ec0d95787ae38.tar.lz
re3-5acce16261606f06e39e09d0bd6ec0d95787ae38.tar.xz
re3-5acce16261606f06e39e09d0bd6ec0d95787ae38.tar.zst
re3-5acce16261606f06e39e09d0bd6ec0d95787ae38.zip
Diffstat (limited to 'src/objects')
-rw-r--r--src/objects/Object.cpp10
-rw-r--r--src/objects/Object.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/src/objects/Object.cpp b/src/objects/Object.cpp
index f3ba8087..bba4d7d9 100644
--- a/src/objects/Object.cpp
+++ b/src/objects/Object.cpp
@@ -8,6 +8,7 @@
WRAPPER void CObject::ObjectDamage(float amount) { EAXJMP(0x4BB240); }
WRAPPER void CObject::DeleteAllTempObjectInArea(CVector, float) { EAXJMP(0x4BBED0); }
+WRAPPER void CObject::Init(void) { EAXJMP(0x4BAEC0); }
int16 &CObject::nNoTempObjects = *(int16*)0x95CCA2;
int16 &CObject::nBodyCastHealth = *(int16*)0x5F7D4C; // 1000
@@ -41,6 +42,15 @@ CObject::CObject(void)
m_pCollidingEntity = nil;
}
+CObject::CObject(int32 mi, bool createRW)
+{
+ if (createRW)
+ SetModelIndex(mi);
+ else
+ SetModelIndexNoCreate(mi);
+ Init();
+}
+
CObject::~CObject(void)
{
CRadar::ClearBlipForEntity(BLIP_OBJECT, CPools::GetObjectPool()->GetIndex(this));
diff --git a/src/objects/Object.h b/src/objects/Object.h
index 0ce1a3aa..21348b52 100644
--- a/src/objects/Object.h
+++ b/src/objects/Object.h
@@ -66,6 +66,7 @@ public:
static void operator delete(void*, size_t);
CObject(void);
+ CObject(int32, bool);
~CObject(void);
void Render(void);
@@ -74,6 +75,7 @@ public:
void ObjectDamage(float amount);
void RefModelInfo(int32 modelId);
+ void Init(void);
static void DeleteAllTempObjectInArea(CVector, float);
};