From c55d1a9e566cda234f783e47f494878f40dc73e8 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 15 Oct 2015 01:17:33 +1000 Subject: [PATCH] Abuse a sneaky mutator hook to kill yet another gamemode specific check --- qcsrc/server/mutators/gamemode_assault.qc | 14 ++++++++++++++ qcsrc/server/spawnpoints.qc | 8 -------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/qcsrc/server/mutators/gamemode_assault.qc b/qcsrc/server/mutators/gamemode_assault.qc index e3a28e3c4..8558faaf0 100644 --- a/qcsrc/server/mutators/gamemode_assault.qc +++ b/qcsrc/server/mutators/gamemode_assault.qc @@ -586,6 +586,20 @@ MUTATOR_HOOKFUNCTION(as, ReadLevelCvars) return false; } +MUTATOR_HOOKFUNCTION(as, OnEntityPreSpawn) +{ + switch(self.classname) + { + case "info_player_team1": + case "info_player_team2": + case "info_player_team3": + case "info_player_team4": + return true; + } + + return false; +} + // scoreboard setup void assault_ScoreRules() { diff --git a/qcsrc/server/spawnpoints.qc b/qcsrc/server/spawnpoints.qc index 6980a9e94..05cadbc70 100644 --- a/qcsrc/server/spawnpoints.qc +++ b/qcsrc/server/spawnpoints.qc @@ -163,8 +163,6 @@ Starting point for a player in team one (Red). Keys: "angle" viewing angle when spawning. */ spawnfunc(info_player_team1) { - if(g_assault) { remove(this); return; } - this.team = NUM_TEAM_1; // red spawnfunc_info_player_deathmatch(this); } @@ -175,8 +173,6 @@ Starting point for a player in team two (Blue). Keys: "angle" viewing angle when spawning. */ spawnfunc(info_player_team2) { - if(g_assault) { remove(this); return; } - this.team = NUM_TEAM_2; // blue spawnfunc_info_player_deathmatch(this); } @@ -186,8 +182,6 @@ Starting point for a player in team three (Yellow). Keys: "angle" viewing angle when spawning. */ spawnfunc(info_player_team3) { - if(g_assault) { remove(this); return; } - this.team = NUM_TEAM_3; // yellow spawnfunc_info_player_deathmatch(this); } @@ -198,8 +192,6 @@ Starting point for a player in team four (Purple). Keys: "angle" viewing angle when spawning. */ spawnfunc(info_player_team4) { - if(g_assault) { remove(this); return; } - this.team = NUM_TEAM_4; // purple spawnfunc_info_player_deathmatch(this); } -- 2.39.2