Skip to content

Commit

Permalink
Core: Remove unused SendVictimToSpec() function
Browse files Browse the repository at this point in the history
It was used in the past when game mode code was in the same file as the core. Removed for being misleading.
  • Loading branch information
rtxa committed Oct 3, 2024
1 parent 7191b6f commit b0852ec
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions valve/addons/amxmodx/scripting/agmodx.sma
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
enum (+=100) {
TASK_STARTMATCH = 1000,
TASK_STARTVERSUS,
TASK_SENDVICTIMTOSPEC,
TASK_SENDTOSPEC,
TASK_SHOWSETTINGS,
TASK_AGTIMER
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -644,9 +641,6 @@ public PlayerPreSpawn(id) {
if (gBlockPlayerSpawn)
return HAM_SUPERCEDE;

if (task_exists(TASK_SENDVICTIMTOSPEC + id))
return HAM_SUPERCEDE;

return HAM_IGNORED;
}

Expand Down Expand Up @@ -703,9 +697,6 @@ public PlayerPostKilled(victim, attacker) {
}
}

if (gSendVictimToSpec)
set_task(3.0, "SendVictimToSpec", victim + TASK_SENDVICTIMTOSPEC);

if (gIsSuddenDeath) {
StartIntermissionMode();
}
Expand Down Expand Up @@ -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
*/
Expand Down

0 comments on commit b0852ec

Please sign in to comment.