Skip to content

Commit b0852ec

Browse files
committed
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.
1 parent 7191b6f commit b0852ec

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

valve/addons/amxmodx/scripting/agmodx.sma

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
enum (+=100) {
4545
TASK_STARTMATCH = 1000,
4646
TASK_STARTVERSUS,
47-
TASK_SENDVICTIMTOSPEC,
4847
TASK_SENDTOSPEC,
4948
TASK_SHOWSETTINGS,
5049
TASK_AGTIMER
@@ -77,7 +76,6 @@ new bool:gBlockCmdKill;
7776
new bool:gBlockCmdSpec;
7877
new bool:gBlockCmdDrop;
7978
new bool:gBlockPlayerSpawn;
80-
new bool:gSendVictimToSpec;
8179
new bool:gSendConnectingToSpec;
8280
new bool:gIsSuddenDeath;
8381

@@ -593,7 +591,6 @@ public client_putinserver(id) {
593591

594592
public client_disconnected(id) {
595593
remove_task(TASK_SENDTOSPEC + id);
596-
remove_task(TASK_SENDVICTIMTOSPEC + id);
597594
remove_task(id);
598595

599596
// Sometimes a player connects and disconnects before ClientPutInServer()
@@ -644,9 +641,6 @@ public PlayerPreSpawn(id) {
644641
if (gBlockPlayerSpawn)
645642
return HAM_SUPERCEDE;
646643

647-
if (task_exists(TASK_SENDVICTIMTOSPEC + id))
648-
return HAM_SUPERCEDE;
649-
650644
return HAM_IGNORED;
651645
}
652646

@@ -703,9 +697,6 @@ public PlayerPostKilled(victim, attacker) {
703697
}
704698
}
705699

706-
if (gSendVictimToSpec)
707-
set_task(3.0, "SendVictimToSpec", victim + TASK_SENDVICTIMTOSPEC);
708-
709700
if (gIsSuddenDeath) {
710701
StartIntermissionMode();
711702
}
@@ -1075,15 +1066,6 @@ public SendToSpec(taskid) {
10751066
hl_set_user_spectator(id, true);
10761067
}
10771068

1078-
public SendVictimToSpec(taskid) {
1079-
new id = taskid - TASK_SENDVICTIMTOSPEC;
1080-
if (is_user_connected(id)) {
1081-
if (!is_user_alive(id) || is_user_bot(id)) {
1082-
hl_set_user_spectator(id, true);
1083-
}
1084-
}
1085-
}
1086-
10871069
/*
10881070
* AG Say
10891071
*/

0 commit comments

Comments
 (0)