diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2021-01-26 00:25:47 +0100 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2021-01-26 00:25:47 +0100 |
commit | 46e63da4d8e6b4c50a663e98d150bd83e0eefb83 (patch) | |
tree | e7a03e5010280216424260da796151cc8c235e15 /src/modelinfo/WeaponModelInfo.cpp | |
parent | garage stuff (diff) | |
parent | Merge pull request #992 from ForeverL95/ForeverL95-patch-1 (diff) | |
download | re3-46e63da4d8e6b4c50a663e98d150bd83e0eefb83.tar re3-46e63da4d8e6b4c50a663e98d150bd83e0eefb83.tar.gz re3-46e63da4d8e6b4c50a663e98d150bd83e0eefb83.tar.bz2 re3-46e63da4d8e6b4c50a663e98d150bd83e0eefb83.tar.lz re3-46e63da4d8e6b4c50a663e98d150bd83e0eefb83.tar.xz re3-46e63da4d8e6b4c50a663e98d150bd83e0eefb83.tar.zst re3-46e63da4d8e6b4c50a663e98d150bd83e0eefb83.zip |
Diffstat (limited to 'src/modelinfo/WeaponModelInfo.cpp')
-rw-r--r-- | src/modelinfo/WeaponModelInfo.cpp | 22 |
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); +} |