SA-MP/bot/scrtimers.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

37 lines
779 B
C++

#include "main.h"
//----------------------------------------------------------------------------------
CScriptTimers::CScriptTimers()
{
m_dwTimerCount = 0;
}
//----------------------------------------------------------------------------------
CScriptTimers::~CScriptTimers()
{
DwordTimerMap::iterator itor;
for (itor = m_Timers.begin(); itor != m_Timers.end(); itor++)
{
FreeMem(itor->second);
SAFE_DELETE(itor->second);
}
m_Timers.clear();
}
//----------------------------------------------------------------------------------
void CScriptTimers::FreeMem(ScriptTimer_s* Timer)
{
if (Timer->cellParams != NULL)
{
free(Timer->cellParams);
Timer->cellParams = NULL;
}
}
//----------------------------------------------------------------------------------