From: Mario Date: Wed, 14 Oct 2015 15:17:33 +0000 (+1000) Subject: Abuse a sneaky mutator hook to kill yet another gamemode specific check X-Git-Tag: xonotic-v0.8.2~1801^2~14 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c55d1a9e566cda234f783e47f494878f40dc73e8;p=xonotic%2Fxonotic-data.pk3dir.git Abuse a sneaky mutator hook to kill yet another gamemode specific check --- 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); }