Merge remote branch 'origin/fruitiex/arenafix'
authorRudolf Polzer <divverent@alientrap.org>
Tue, 30 Nov 2010 20:37:22 +0000 (21:37 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 30 Nov 2010 20:37:22 +0000 (21:37 +0100)
qcsrc/server/arena.qc
qcsrc/server/g_damage.qc
qcsrc/server/mutators/base.qh
qcsrc/server/mutators/gamemode_freezetag.qc

index 12f25fad50c26d31204b84510628a9d81ea99e37..fbabbcf74ac6c4e5c0bfff4ae32ab41ec2fd734e 100644 (file)
@@ -208,6 +208,7 @@ void Arena_Warmup()
 {
        float f;
        string msg;
+    entity e;
 
        if((!g_arena && !g_ca && !g_freezetag) || (g_arena && !arena_roundbased) || (time < game_starttime))
                return;
@@ -245,7 +246,8 @@ void Arena_Warmup()
                        else if(f == 1)
                                Announce("1");
 
-                       centerprint(self, msg);
+            FOR_EACH_PLAYER(e)
+                centerprint(e, msg);
                }
 
                if (g_arena) {
@@ -268,13 +270,13 @@ void Arena_Warmup()
                if(g_ca) {
                        ca_players = 0;
 
-                       FOR_EACH_PLAYER(self)
+            FOR_EACH_PLAYER(e)
                                ca_players += 1;
                }
-       }
 
-       if(self.classname == "player" && self.health > 0 && self.movetype == MOVETYPE_NONE)
-               self.movetype = MOVETYPE_WALK;
+        if(self.classname == "player" && self.health > 0 && self.movetype == MOVETYPE_NONE)
+            self.movetype = MOVETYPE_WALK;
+       }
 }
 
 void count_spawned_players()
index b8c6d4cf04d397bcc326c2ca17c4c57c58ab2923..fd5b445eba8664746b8ad43f64738e3ad0534fd7 100644 (file)
@@ -631,6 +631,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                frag_target = targ;
                frag_damage = damage;
                frag_force = force;
+        frag_deathtype = deathtype;
                MUTATOR_CALLHOOK(PlayerDamage_Calculate);
                damage = frag_damage;
                force = frag_force;
index 974e1a4c5764ab3268dcf2612e4eacd017f85456..b7c523dcbbfd0853c80bab058559b380fb104f0d 100644 (file)
@@ -136,6 +136,7 @@ MUTATOR_HOOKABLE(PlayerDamage_Calculate);
        // INPUT:
                entity frag_attacker;
                entity frag_target;
+               float frag_deathtype;
        // INPUT, OUTPUT:
                float frag_damage;
                vector frag_force;
@@ -144,4 +145,4 @@ MUTATOR_HOOKABLE(PlayerPowerups);
        // called at the end of player_powerups() in cl_client.qc, used for manipulating the values which are set by powerup items.
        // INPUT
        entity self;
-       float olditems; // also technically output, but since it is at the end of the function it's useless for that :P 
\ No newline at end of file
+       float olditems; // also technically output, but since it is at the end of the function it's useless for that :P 
index f07c30ef553df38ce533789c2b35e0dbe6f9fb7e..790c9d04254e83cb8c82873568b55c6bca56e008 100644 (file)
@@ -261,7 +261,7 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerDamage_Calculate)
 {
     if(g_freezetag)
     {
-        if(frag_target.freezetag_frozen == 1)
+        if(frag_target.freezetag_frozen == 1 && frag_deathtype != DEATH_HURTTRIGGER)
         {
             frag_damage = 0;
             frag_force = frag_force * cvar("g_freezetag_frozen_force");