summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-05-17 15:16:12 +0200
committeraap <aap@papnet.eu>2020-05-17 15:16:12 +0200
commit964acba08382cd0748cd46f4676a7b4e9025957a (patch)
tree5631d3e1a1a1e6112c18ff4e750979aa245f48e8 /src
parentRemove magic consts from ms_aAnimAssocDefinitions (diff)
downloadre3-964acba08382cd0748cd46f4676a7b4e9025957a.tar
re3-964acba08382cd0748cd46f4676a7b4e9025957a.tar.gz
re3-964acba08382cd0748cd46f4676a7b4e9025957a.tar.bz2
re3-964acba08382cd0748cd46f4676a7b4e9025957a.tar.lz
re3-964acba08382cd0748cd46f4676a7b4e9025957a.tar.xz
re3-964acba08382cd0748cd46f4676a7b4e9025957a.tar.zst
re3-964acba08382cd0748cd46f4676a7b4e9025957a.zip
Diffstat (limited to '')
-rw-r--r--src/modelinfo/PedModelInfo.cpp3
-rw-r--r--src/modelinfo/PedModelInfo.h9
2 files changed, 11 insertions, 1 deletions
diff --git a/src/modelinfo/PedModelInfo.cpp b/src/modelinfo/PedModelInfo.cpp
index 0cb0fc36..473e8b63 100644
--- a/src/modelinfo/PedModelInfo.cpp
+++ b/src/modelinfo/PedModelInfo.cpp
@@ -21,16 +21,19 @@ CPedModelInfo::DeleteRwObject(void)
frame = RpAtomicGetFrame(m_head);
RpAtomicDestroy(m_head);
RwFrameDestroy(frame);
+ m_head = nil;
}
if(m_lhand){
frame = RpAtomicGetFrame(m_lhand);
RpAtomicDestroy(m_lhand);
RwFrameDestroy(frame);
+ m_lhand = nil;
}
if(m_rhand){
frame = RpAtomicGetFrame(m_rhand);
RpAtomicDestroy(m_rhand);
RwFrameDestroy(frame);
+ m_rhand = nil;
}
#endif
CClumpModelInfo::DeleteRwObject(); // PC calls this first
diff --git a/src/modelinfo/PedModelInfo.h b/src/modelinfo/PedModelInfo.h
index 52f75894..d73d3646 100644
--- a/src/modelinfo/PedModelInfo.h
+++ b/src/modelinfo/PedModelInfo.h
@@ -36,7 +36,14 @@ public:
static RwObjectNameIdAssocation m_pPedIds[PED_NODE_MAX];
- CPedModelInfo(void) : CClumpModelInfo(MITYPE_PED) { m_hitColModel = nil; }
+ CPedModelInfo(void) : CClumpModelInfo(MITYPE_PED) {
+ m_hitColModel = nil;
+#ifdef PED_SKIN
+ m_head = nil;
+ m_lhand = nil;
+ m_rhand = nil;
+#endif
+ }
~CPedModelInfo(void) { delete m_hitColModel; }
void DeleteRwObject(void);
void SetClump(RpClump *);