From: FruitieX Date: Thu, 25 Nov 2010 13:19:05 +0000 (+0200) Subject: fix handling of kill triggers in freezetag, also electro needs to check for self... X-Git-Tag: xonotic-v0.1.0preview~86^2~2^2~8 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=81a45dfb2aebe2580bc958768ba304e0f2d1a8c2;p=xonotic%2Fxonotic-data.pk3dir.git fix handling of kill triggers in freezetag, also electro needs to check for self.owner.freezetag_frozen not self.freezetag_frozen --- diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index d62ade2be..829290163 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -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 } diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index c3e56a3d0..c9cec9745 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -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"); diff --git a/qcsrc/server/w_electro.qc b/qcsrc/server/w_electro.qc index 29c4d5b1f..a0b06c967 100644 --- a/qcsrc/server/w_electro.qc +++ b/qcsrc/server/w_electro.qc @@ -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;