summaryrefslogtreecommitdiffstats
path: root/src/vehicles/Plane.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-11-26 16:47:19 +0100
committeraap <aap@papnet.eu>2020-11-26 17:39:59 +0100
commitd857758c167ee06840ec806524191e95ff37f98a (patch)
treefcfdf828156ae6e394ba768756629906f9d73eab /src/vehicles/Plane.cpp
parentmemory heap starting to work (diff)
downloadre3-d857758c167ee06840ec806524191e95ff37f98a.tar
re3-d857758c167ee06840ec806524191e95ff37f98a.tar.gz
re3-d857758c167ee06840ec806524191e95ff37f98a.tar.bz2
re3-d857758c167ee06840ec806524191e95ff37f98a.tar.lz
re3-d857758c167ee06840ec806524191e95ff37f98a.tar.xz
re3-d857758c167ee06840ec806524191e95ff37f98a.tar.zst
re3-d857758c167ee06840ec806524191e95ff37f98a.zip
Diffstat (limited to 'src/vehicles/Plane.cpp')
-rw-r--r--src/vehicles/Plane.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vehicles/Plane.cpp b/src/vehicles/Plane.cpp
index 1a6f1a88..532be938 100644
--- a/src/vehicles/Plane.cpp
+++ b/src/vehicles/Plane.cpp
@@ -15,6 +15,7 @@
#include "World.h"
#include "HandlingMgr.h"
#include "Plane.h"
+#include "MemoryHeap.h"
CPlaneNode *pPathNodes;
CPlaneNode *pPath2Nodes;
@@ -551,9 +552,11 @@ CPlane::ProcessControl(void)
if(m_rwObject && RwObjectGetType(m_rwObject) == rpCLUMP){
DeleteRwObject();
if(mi->m_planeLodId != -1){
+ PUSH_MEMID(MEMID_WORLD);
m_rwObject = CModelInfo::GetModelInfo(mi->m_planeLodId)->CreateInstance();
+ POP_MEMID();
if(m_rwObject)
- m_matrix.Attach(RwFrameGetMatrix(RpAtomicGetFrame((RpAtomic*)m_rwObject)));
+ m_matrix.AttachRW(RwFrameGetMatrix(RpAtomicGetFrame((RpAtomic*)m_rwObject)));
}
}
}else if(CStreaming::HasModelLoaded(GetModelIndex())){