mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 22:47:29 +08:00
a3810144d1
* Implements CScriptTimers destructor * Implements `CScriptTimers::FreeMem` * Implements CPlayerPool destructor * Implements `CPlayerPool::Delete` * Implements `CNetGame::sub_415EA0` * Implements CVehiclePool destructor * Implements `CVehiclePool::Delete` * Implements ` CNetGame::sub_415EC0`
40 lines
870 B
C++
40 lines
870 B
C++
|
|
#include "../main.h"
|
|
|
|
extern CNetGame *pNetGame;
|
|
|
|
//----------------------------------------------------
|
|
|
|
CPlayerPool::CPlayerPool()
|
|
{
|
|
field_7163 = 0;
|
|
field_8107 = 0;
|
|
|
|
// loop through and initialize all net players to null and slot states to false
|
|
for(PLAYERID playerId = 0; playerId < MAX_PLAYERS; playerId++) {
|
|
m_bPlayerSlotState[playerId] = FALSE;
|
|
field_7167[playerId] = 0;
|
|
field_810B[playerId] = 0;
|
|
}
|
|
}
|
|
|
|
//----------------------------------------------------
|
|
|
|
CPlayerPool::~CPlayerPool()
|
|
{
|
|
for(PLAYERID playerId = 0; playerId < MAX_PLAYERS; playerId++) {
|
|
Delete(playerId,0);
|
|
}
|
|
}
|
|
|
|
//----------------------------------------------------
|
|
|
|
BOOL CPlayerPool::Delete(PLAYERID playerId, BYTE byteReason)
|
|
{
|
|
m_bPlayerSlotState[playerId] = FALSE;
|
|
pNetGame->sub_415EA0(playerId, FALSE);
|
|
return TRUE;
|
|
}
|
|
|
|
//----------------------------------------------------
|