]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix handling of kill triggers in freezetag, also electro needs to check for self...
authorFruitieX <fruitiex@gmail.com>
Thu, 25 Nov 2010 13:19:05 +0000 (15:19 +0200)
committerFruitieX <fruitiex@gmail.com>
Thu, 25 Nov 2010 13:19:05 +0000 (15:19 +0200)
qcsrc/server/cl_player.qc
qcsrc/server/g_damage.qc
qcsrc/server/w_electro.qc

index d62ade2bee2b77dfc2d265f2954e0ce02dcd0abe..829290163e080277e3a20cb5ef29fbb69a3bd32f 100644 (file)
@@ -627,9 +627,9 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
 
                if(g_freezetag)
         {
-            if(!defer_ClientKill_Now_TeamChange)
+            if(deathtype != DEATH_KILL || attacker == self)
                 return;
-            else // team change...
+            else // team change or kill trigger
                 freezetag_Unfreeze(); // remove all ice blocks 
         }
 
index c3e56a3d044085f4fd1ed6a5cf8cff2b8d2f42f9..c9cec9745e87a294e8d4ceaf28071079a1052c52 100644 (file)
@@ -528,7 +528,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
 
                if(g_freezetag)
                {
-                       if(targ.freezetag_frozen == 1 && deathtype != DEATH_KILL) // we still need teamchange to actually kill
+                       if(targ.freezetag_frozen == 1)
                        {
                                damage = 0;
                                force = force * cvar("g_freezetag_frozen_force");
index 29c4d5b1fd8c6930e0a5a5cef0a84efb6a367a5b..a0b06c967c9e0ed3b3e1a09449be36ed25db4896 100644 (file)
@@ -231,7 +231,7 @@ void lgbeam_think()
                remove(self);
                return;
        }
-       if (self.owner.weaponentity.state != WS_INUSE || (self.owner.ammo_cells <= 0 && !(self.owner.items & IT_UNLIMITED_WEAPON_AMMO)) || self.owner.deadflag != DEAD_NO || !self.owner.BUTTON_ATCK || (g_freezetag && self.freezetag_frozen))
+       if (self.owner.weaponentity.state != WS_INUSE || (self.owner.ammo_cells <= 0 && !(self.owner.items & IT_UNLIMITED_WEAPON_AMMO)) || self.owner.deadflag != DEAD_NO || !self.owner.BUTTON_ATCK || (g_freezetag && self.owner.freezetag_frozen))
        {
                if(self == self.owner.lgbeam)
                        self.owner.lgbeam = world;