]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Mark eliminated players on the scoreboard in freezetag too
authorterencehill <piuntn@gmail.com>
Fri, 21 Nov 2014 23:19:00 +0000 (00:19 +0100)
committerterencehill <piuntn@gmail.com>
Fri, 21 Nov 2014 23:19:00 +0000 (00:19 +0100)
qcsrc/server/mutators/gamemode_freezetag.qc

index b02679e7a11e81acb3282524d7144d6f1d18791a..9034887d82712e61b1144d312a424ea5812694b9 100644 (file)
@@ -26,6 +26,8 @@ void freezetag_count_alive_players()
                e.yellowalive_stat = yellowalive;
                e.pinkalive_stat = pinkalive;
        }
+
+       eliminatedPlayers.SendFlags |= 1;
 }
 #define FREEZETAG_ALIVE_TEAMS() ((redalive > 0) + (bluealive > 0) + (yellowalive > 0) + (pinkalive > 0))
 #define FREEZETAG_ALIVE_TEAMS_OK() (FREEZETAG_ALIVE_TEAMS() == freezetag_teams)
@@ -194,6 +196,13 @@ void freezetag_Unfreeze(entity attacker)
        Unfreeze(self);
 }
 
+float freezetag_isEliminated(entity e)
+{
+       if(e.frozen == 1 || e.deadflag != DEAD_NO)
+               return TRUE;
+       return FALSE;
+}
+
 
 // ================
 // Bot player logic
@@ -544,6 +553,8 @@ void freezetag_Initialize()
        addstat(STAT_BLUEALIVE, AS_INT, bluealive_stat);
        addstat(STAT_YELLOWALIVE, AS_INT, yellowalive_stat);
        addstat(STAT_PINKALIVE, AS_INT, pinkalive_stat);
+
+       EliminatedPlayers_Init(freezetag_isEliminated);
 }
 
 MUTATOR_DEFINITION(gamemode_freezetag)