summaryrefslogtreecommitdiffstats
path: root/src/modelinfo/WeaponModelInfo.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2021-01-24 14:06:16 +0100
committeraap <aap@papnet.eu>2021-01-24 14:06:16 +0100
commit9361aeb8eb281a3669b03d7d845aece483c95820 (patch)
treef96d341b95eabe331d1cdc72c9f8109b5168b968 /src/modelinfo/WeaponModelInfo.cpp
parentCSimpleModelInfo (diff)
downloadre3-9361aeb8eb281a3669b03d7d845aece483c95820.tar
re3-9361aeb8eb281a3669b03d7d845aece483c95820.tar.gz
re3-9361aeb8eb281a3669b03d7d845aece483c95820.tar.bz2
re3-9361aeb8eb281a3669b03d7d845aece483c95820.tar.lz
re3-9361aeb8eb281a3669b03d7d845aece483c95820.tar.xz
re3-9361aeb8eb281a3669b03d7d845aece483c95820.tar.zst
re3-9361aeb8eb281a3669b03d7d845aece483c95820.zip
Diffstat (limited to '')
-rw-r--r--src/modelinfo/WeaponModelInfo.cpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/modelinfo/WeaponModelInfo.cpp b/src/modelinfo/WeaponModelInfo.cpp
index d9294c3f..1d194ec4 100644
--- a/src/modelinfo/WeaponModelInfo.cpp
+++ b/src/modelinfo/WeaponModelInfo.cpp
@@ -4,6 +4,9 @@
#include "AnimManager.h"
#include "VisibilityPlugins.h"
+base::cRelocatableChunkClassInfo CWeaponModelInfo::msClassInfo("CWeaponModelInfo", VTABLE_ADDR(&msClassInstance), sizeof(msClassInstance));
+CWeaponModelInfo CWeaponModelInfo::msClassInstance;
+
void
CWeaponModelInfo::SetAnimFile(const char *file)
{
@@ -35,19 +38,34 @@ CWeaponModelInfo::Init(void)
void
CWeaponModelInfo::SetWeaponInfo(int32 weaponId)
{
- m_atomics[2] = (RpAtomic*)weaponId;
+ m_relatedModel = (CSimpleModelInfo*)weaponId;
}
eWeaponType
CWeaponModelInfo::GetWeaponInfo(void)
{
- return (eWeaponType)(uintptr)m_atomics[2];
+ return (eWeaponType)(uintptr)m_relatedModel;
}
+/*
void
CWeaponModelInfo::SetAtomic(int n, RpAtomic *atomic)
{
CSimpleModelInfo::SetAtomic(n, atomic);
CVisibilityPlugins::SetAtomicRenderCallback(atomic, CVisibilityPlugins::RenderWeaponCB);
}
+*/
+
+void
+CWeaponModelInfo::RcWriteThis(base::cRelocatableChunkWriter &writer)
+{
+ writer.AllocateRaw(this, sizeof(*this), sizeof(void*), false, true);
+ writer.Class(VTABLE_ADDR(this), msClassInfo);
+}
+void
+CWeaponModelInfo::RcWriteEmpty(base::cRelocatableChunkWriter &writer)
+{
+ writer.AllocateRaw(this, sizeof(*this), sizeof(void*), false, true);
+ writer.Class(VTABLE_ADDR(this), msClassInfo);
+}