]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Do not unfreeze automatically any player if the round is over
authorterencehill <piuntn@gmail.com>
Thu, 14 Feb 2013 17:24:16 +0000 (18:24 +0100)
committerterencehill <piuntn@gmail.com>
Thu, 14 Feb 2013 17:25:43 +0000 (18:25 +0100)
qcsrc/server/defs.qh
qcsrc/server/mutators/gamemode_freezetag.qc

index 6c3b662d4c25a28ede9883e49d306644b0fca488..9defc3b6687d463b275a5d90e0ad5faf9112b3e9 100644 (file)
@@ -604,8 +604,6 @@ float serverflags;
 .float player_blocked;
 
 .float freezetag_frozen;
-.float freezetag_frozen_timeout;
-.float freezetag_revive_progress;
 
 .entity muzzle_flash;
 .float misc_bulletcounter;     // replaces uzi & hlac bullet counter.
index a7c23dc52ef3181020f423db6a653877584beac8..1fd30de2926715dd7c56c687e3499a6d91216ede 100644 (file)
@@ -1,3 +1,5 @@
+.float freezetag_frozen_timeout;
+.float freezetag_revive_progress;
 float freezetag_teams;
 float freezetag_CheckTeams();
 float freezetag_CheckWinner();
@@ -118,6 +120,8 @@ float freezetag_CheckWinner()
                FOR_EACH_REALCLIENT(e)
                        centerprint(e, "Round over, there's no winner");
                bprint("Round over, there's no winner.\n");
+               FOR_EACH_PLAYER(e)
+                       e.freezetag_frozen_timeout = 0;
                return 1;
        }
 
@@ -142,6 +146,8 @@ float freezetag_CheckWinner()
                bprint("^5Round tied! All teams were frozen.\n");
        }
 
+       FOR_EACH_PLAYER(e)
+               e.freezetag_frozen_timeout = 0;
        return 1;
 }
 
@@ -561,7 +567,7 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerPhysics)
 
 MUTATOR_HOOKFUNCTION(freezetag_PlayerDamage_Calculate)
 {
-       if(frag_target.freezetag_frozen == 1 && frag_deathtype != DEATH_HURTTRIGGER)
+       if(frag_target.freezetag_frozen && frag_deathtype != DEATH_HURTTRIGGER)
        {
                frag_damage = 0;
                frag_force = frag_force * autocvar_g_freezetag_frozen_force;