From 9a5a830cee4500f14d6250f0b88373b46bfb8abd Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Tue, 6 Aug 2024 19:05:29 +0800 Subject: [PATCH] [saco] Implement/match `CEntity::IsAdded()` --- saco/game/entity.cpp | 15 +++++++++++++++ saco/game/entity.h | 2 ++ 2 files changed, 17 insertions(+) diff --git a/saco/game/entity.cpp b/saco/game/entity.cpp index ac3ba33..d821a3a 100644 --- a/saco/game/entity.cpp +++ b/saco/game/entity.cpp @@ -248,3 +248,18 @@ float CEntity::GetDistanceFromPoint(float X, float Y, float Z) //----------------------------------------------------------- +BOOL CEntity::IsAdded() +{ + // Check for CPlaceable messup + if(m_pEntity) { + if (m_pEntity->vtable == 0x863C40) + return FALSE; + + if(m_pEntity->dwUnkModelRel) + return TRUE; + } + return FALSE; +} + +//----------------------------------------------------------- + diff --git a/saco/game/entity.h b/saco/game/entity.h index bb1af6a..ae85b37 100644 --- a/saco/game/entity.h +++ b/saco/game/entity.h @@ -31,6 +31,8 @@ public: BOOL FUNC_1009FDE0(); + BOOL IsAdded(); + VECTOR field_4[5]; ENTITY_TYPE *m_pEntity; DWORD m_dwGTAId;