]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Abuse a sneaky mutator hook to kill yet another gamemode specific check
authorMario <mario@smbclan.net>
Wed, 14 Oct 2015 15:17:33 +0000 (01:17 +1000)
committerMario <mario@smbclan.net>
Wed, 14 Oct 2015 15:17:33 +0000 (01:17 +1000)
qcsrc/server/mutators/gamemode_assault.qc
qcsrc/server/spawnpoints.qc

index e3a28e3c4d9986027b8ce7517f3991f248db268e..8558faaf045b5587ee94a6a2ece3f68e7f7feeb6 100644 (file)
@@ -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()
 {
index 6980a9e9439d59a0c6a53b72d94065e2244c0ee1..05cadbc707490c20ad902821958713c54edfb1c7 100644 (file)
@@ -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);
 }