From b0852ec70959eb2f17331daec50a4a70e633ccd5 Mon Sep 17 00:00:00 2001 From: rtxa Date: Wed, 2 Oct 2024 23:18:09 -0300 Subject: [PATCH] Core: Remove unused SendVictimToSpec() function It was used in the past when game mode code was in the same file as the core. Removed for being misleading. --- valve/addons/amxmodx/scripting/agmodx.sma | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/valve/addons/amxmodx/scripting/agmodx.sma b/valve/addons/amxmodx/scripting/agmodx.sma index f3ecb94..2c95e25 100644 --- a/valve/addons/amxmodx/scripting/agmodx.sma +++ b/valve/addons/amxmodx/scripting/agmodx.sma @@ -44,7 +44,6 @@ enum (+=100) { TASK_STARTMATCH = 1000, TASK_STARTVERSUS, - TASK_SENDVICTIMTOSPEC, TASK_SENDTOSPEC, TASK_SHOWSETTINGS, TASK_AGTIMER @@ -77,7 +76,6 @@ new bool:gBlockCmdKill; new bool:gBlockCmdSpec; new bool:gBlockCmdDrop; new bool:gBlockPlayerSpawn; -new bool:gSendVictimToSpec; new bool:gSendConnectingToSpec; new bool:gIsSuddenDeath; @@ -593,7 +591,6 @@ public client_putinserver(id) { public client_disconnected(id) { remove_task(TASK_SENDTOSPEC + id); - remove_task(TASK_SENDVICTIMTOSPEC + id); remove_task(id); // Sometimes a player connects and disconnects before ClientPutInServer() @@ -644,9 +641,6 @@ public PlayerPreSpawn(id) { if (gBlockPlayerSpawn) return HAM_SUPERCEDE; - if (task_exists(TASK_SENDVICTIMTOSPEC + id)) - return HAM_SUPERCEDE; - return HAM_IGNORED; } @@ -703,9 +697,6 @@ public PlayerPostKilled(victim, attacker) { } } - if (gSendVictimToSpec) - set_task(3.0, "SendVictimToSpec", victim + TASK_SENDVICTIMTOSPEC); - if (gIsSuddenDeath) { StartIntermissionMode(); } @@ -1075,15 +1066,6 @@ public SendToSpec(taskid) { hl_set_user_spectator(id, true); } -public SendVictimToSpec(taskid) { - new id = taskid - TASK_SENDVICTIMTOSPEC; - if (is_user_connected(id)) { - if (!is_user_alive(id) || is_user_bot(id)) { - hl_set_user_spectator(id, true); - } - } -} - /* * AG Say */