SA-MP/bot/net/vehiclepool.cpp
RD42 a3810144d1 [bot] Implement CNetGame destructor
* 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`
2024-03-14 23:24:26 +08:00

33 lines
728 B
C++

#include "../main.h"
extern CNetGame *pNetGame;
//----------------------------------------------------
CVehiclePool::CVehiclePool()
{
// loop through and initialize all net players to null and slot states to false
for(VEHICLEID VehicleID = 0; VehicleID < MAX_VEHICLES; VehicleID++) {
field_84D0[VehicleID] = 0;
}
}
//----------------------------------------------------
CVehiclePool::~CVehiclePool()
{
for(VEHICLEID VehicleID = 0; VehicleID < MAX_VEHICLES; VehicleID++) {
Delete(VehicleID);
}
}
//----------------------------------------------------
BOOL CVehiclePool::Delete(VEHICLEID VehicleID)
{
pNetGame->sub_415EC0(VehicleID, FALSE);
return TRUE;
}
//----------------------------------------------------