mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-01-03 16:13:34 +08:00
[saco] Implement/match CEntity::Remove()
This commit is contained in:
parent
e3320fd439
commit
4fd253f52e
@ -1,7 +1,15 @@
|
||||
|
||||
#include <windows.h>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "../main.h"
|
||||
#include "util.h"
|
||||
#include "entity.h"
|
||||
|
||||
extern CGame *pGame;
|
||||
extern CNetGame *pNetGame;
|
||||
extern CChatWindow *pChatWindow;
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
@ -299,3 +307,28 @@ BOOL CEntity::IsAdded()
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
void CEntity::Remove()
|
||||
{
|
||||
// Check for CPlaceable messup
|
||||
if(!m_pEntity || m_pEntity->vtable == 0x863C40)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
OutputDebugString("CEntity::Remove - m_pEntity == NULL or CPlaceable");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
if(m_pEntity->dwUnkModelRel) {
|
||||
WorldRemoveEntity((PDWORD)m_pEntity);
|
||||
|
||||
#ifdef _DEBUG
|
||||
if (IsAdded())
|
||||
{
|
||||
OutputDebugString("CEntity::Remove failed...");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
|
@ -32,6 +32,7 @@ public:
|
||||
BOOL FUNC_1009FDE0();
|
||||
|
||||
virtual void Add();
|
||||
virtual void Remove();
|
||||
BOOL IsAdded();
|
||||
|
||||
VECTOR field_4[5];
|
||||
|
Loading…
x
Reference in New Issue
Block a user