From 6225e5072309e69e98246f59222ba82ddf6a418a Mon Sep 17 00:00:00 2001 From: aap Date: Thu, 9 Apr 2020 16:35:24 +0200 Subject: fixed questionable RW usage; changed radar mask to PS2 techinque --- src/entities/Entity.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/entities/Entity.cpp') diff --git a/src/entities/Entity.cpp b/src/entities/Entity.cpp index 7a050818..07d70394 100644 --- a/src/entities/Entity.cpp +++ b/src/entities/Entity.cpp @@ -275,9 +275,9 @@ CEntity::CreateRwObject(void) if(IsBuilding()) gBuildings++; if(RwObjectGetType(m_rwObject) == rpATOMIC) - m_matrix.AttachRW(RwFrameGetMatrix(RpAtomicGetFrame(m_rwObject)), false); + m_matrix.AttachRW(RwFrameGetMatrix(RpAtomicGetFrame((RpAtomic*)m_rwObject)), false); else if(RwObjectGetType(m_rwObject) == rpCLUMP) - m_matrix.AttachRW(RwFrameGetMatrix(RpClumpGetFrame(m_rwObject)), false); + m_matrix.AttachRW(RwFrameGetMatrix(RpClumpGetFrame((RpClump*)m_rwObject)), false); mi->AddRef(); } } @@ -290,7 +290,7 @@ CEntity::DeleteRwObject(void) m_matrix.Detach(); if(m_rwObject){ if(RwObjectGetType(m_rwObject) == rpATOMIC){ - f = RpAtomicGetFrame(m_rwObject); + f = RpAtomicGetFrame((RpAtomic*)m_rwObject); RpAtomicDestroy((RpAtomic*)m_rwObject); RwFrameDestroy(f); }else if(RwObjectGetType(m_rwObject) == rpCLUMP) @@ -307,9 +307,9 @@ CEntity::UpdateRwFrame(void) { if(m_rwObject){ if(RwObjectGetType(m_rwObject) == rpATOMIC) - RwFrameUpdateObjects(RpAtomicGetFrame(m_rwObject)); + RwFrameUpdateObjects(RpAtomicGetFrame((RpAtomic*)m_rwObject)); else if(RwObjectGetType(m_rwObject) == rpCLUMP) - RwFrameUpdateObjects(RpClumpGetFrame(m_rwObject)); + RwFrameUpdateObjects(RpClumpGetFrame((RpClump*)m_rwObject)); } } @@ -482,9 +482,9 @@ CEntity::AttachToRwObject(RwObject *obj) m_rwObject = obj; if(m_rwObject){ if(RwObjectGetType(m_rwObject) == rpATOMIC) - m_matrix.Attach(RwFrameGetMatrix(RpAtomicGetFrame(m_rwObject)), false); + m_matrix.Attach(RwFrameGetMatrix(RpAtomicGetFrame((RpAtomic*)m_rwObject)), false); else if(RwObjectGetType(m_rwObject) == rpCLUMP) - m_matrix.Attach(RwFrameGetMatrix(RpClumpGetFrame(m_rwObject)), false); + m_matrix.Attach(RwFrameGetMatrix(RpClumpGetFrame((RpClump*)m_rwObject)), false); CModelInfo::GetModelInfo(m_modelIndex)->AddRef(); } } -- cgit v1.2.3