[bot] Update gamemodes.cpp/.h

* Update `CGameMode::Load(...)`
* Update `CGameMode::Unload()`
This commit is contained in:
RD42 2024-07-03 23:27:12 +08:00
parent 7b974d6b4c
commit c0945ce5c5
2 changed files with 3 additions and 1 deletions

View File

@ -55,6 +55,7 @@ bool CGameMode::Load(char* pFileName)
if (err != AMX_ERR_NONE) if (err != AMX_ERR_NONE)
{ {
AMXPrintError(this, &m_amx, err); AMXPrintError(this, &m_amx, err);
//logprintf("Failed to load '%s' script.", szGameModeFileName);
return false; return false;
} }
@ -63,6 +64,7 @@ bool CGameMode::Load(char* pFileName)
amx_StringInit(&m_amx); amx_StringInit(&m_amx);
amx_FileInit(&m_amx); amx_FileInit(&m_amx);
amx_TimeInit(&m_amx); amx_TimeInit(&m_amx);
//amx_DGramInit(&m_amx);
amx_CustomInit(&m_amx); amx_CustomInit(&m_amx);
// Execute OnGameModeInit callback, if it exists! // Execute OnGameModeInit callback, if it exists!
@ -100,6 +102,7 @@ void CGameMode::Unload()
if (m_bInitialised) if (m_bInitialised)
{ {
aux_FreeProgram(&m_amx); aux_FreeProgram(&m_amx);
//amx_DGramCleanup(&m_amx);
amx_TimeCleanup(&m_amx); amx_TimeCleanup(&m_amx);
amx_FileCleanup(&m_amx); amx_FileCleanup(&m_amx);
amx_StringCleanup(&m_amx); amx_StringCleanup(&m_amx);

View File

@ -22,7 +22,6 @@ public:
bool Load(char* pFileName); bool Load(char* pFileName);
void Unload(); void Unload();
void Frame(float fElapsedTime); void Frame(float fElapsedTime);
int CallPublic(char* szFuncName); int CallPublic(char* szFuncName);