From f40f44b14e028c4bb2bee2e898c210e3f41b20bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Tue, 21 Jul 2020 05:59:31 +0300 Subject: Peds, Hud, CFO 1/2, fixes - including zone names --- src/entities/Entity.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/entities/Entity.cpp') diff --git a/src/entities/Entity.cpp b/src/entities/Entity.cpp index 63ea03fc..4c88c485 100644 --- a/src/entities/Entity.cpp +++ b/src/entities/Entity.cpp @@ -620,6 +620,23 @@ CEntity::PruneReferences(void) } } +// Clean up the reference from *pent -> 'this' +void +CEntity::CleanUpOldReference(CEntity **pent) +{ + CReference* ref, ** lastnextp; + lastnextp = &m_pFirstReference; + for (ref = m_pFirstReference; ref; ref = ref->next) { + if (ref->pentity == pent) { + *lastnextp = ref->next; + ref->next = CReferences::pEmptyList; + CReferences::pEmptyList = ref; + break; + } + lastnextp = &ref->next; + } +} + void CEntity::UpdateRpHAnim(void) { -- cgit v1.2.3