From 6f7ae684360e846e57c64f981600359bda6ef5ee Mon Sep 17 00:00:00 2001 From: zaCade Date: Sun, 5 Aug 2018 15:56:35 +0200 Subject: [PATCH] Extend: Load anyway, despite no game config. Disable the GameOver cancel instead. --- Extend/scripting/Extend.sp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Extend/scripting/Extend.sp b/Extend/scripting/Extend.sp index d83173e3..442bcca4 100644 --- a/Extend/scripting/Extend.sp +++ b/Extend/scripting/Extend.sp @@ -14,6 +14,7 @@ ConVar g_cvarMpFragLimit = null; ConVar g_cvarMpWinLimit = null; ConVar g_cvarMpTimeLimit = null; +bool g_bGameOver = false; Address g_pGameOver; public Plugin myinfo = @@ -71,16 +72,20 @@ public void OnPluginStart() Handle hGameConf = LoadGameConfigFile("Extend.games"); if(hGameConf == INVALID_HANDLE) { - SetFailState("Couldn't load Extend.games game config!"); + g_bGameOver = false; + LogError("Couldn't load Extend.games game config! GameOver cancel disabled."); return; } if(!(g_pGameOver = GameConfGetAddress(hGameConf, "GameOver"))) { + g_bGameOver = false; CloseHandle(hGameConf); - SetFailState("Couldn't get GameOver address from game config!"); + LogError("Couldn't get GameOver address from game config! GameOver cancel disabled."); return; } + + g_bGameOver = true; CloseHandle(hGameConf); } @@ -364,6 +369,9 @@ public int Handler_VoteCallback(Menu menu, MenuAction action, int param1, int pa void CancelGameOver() { + if (!g_bGameOver) + return; + StoreToAddress(g_pGameOver, 0, NumberType_Int8); for (int client = 1; client <= MaxClients; client++)