]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Avoid freezing the first player who joins the game in freezetag, there's no need
authorterencehill <piuntn@gmail.com>
Sat, 17 Nov 2012 22:40:38 +0000 (23:40 +0100)
committerterencehill <piuntn@gmail.com>
Sat, 17 Nov 2012 22:40:38 +0000 (23:40 +0100)
qcsrc/server/mutators/gamemode_freezetag.qc

index de325c3d1b9d5b0ba39b77a0a4d8e48273a2e228..8a00f52a77faeaf24d10507d691e53ccc9bcd0ef 100644 (file)
@@ -302,7 +302,7 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerDies)
 
 MUTATOR_HOOKFUNCTION(freezetag_PlayerSpawn)
 {
-       if(time <= game_starttime)
+       if(time <= game_starttime || total_players == 0)
                return 1;
 
        freezetag_Unfreeze(world); // start by making sure that all ice blocks are removed
@@ -313,6 +313,7 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerSpawn)
                next_round = time;
                return 1;
        }
+
        if(warmup && time > warmup) // spawn too late, freeze player
        {
                centerprint(self, "^1You spawned after the round started, you'll spawn as frozen.\n");