mirror of
https://github.com/dashr9230/SA-MP.git
synced 2026-10-11 09:48:13 +08:00
[saco] Implement/match CEntity::Remove()
This commit is contained in:
1 parent
e3320fd439
commit
4fd253f52e
2 files changed
+34
No files matched your search
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user