From c6927c6b537cb26102f1bd4ddfb5c445c07733ba Mon Sep 17 00:00:00 2001 From: Finny Merrill Date: Sun, 25 Jan 2004 05:25:40 +0000 Subject: [PATCH] Fixed Give_Frags_Building assigning atk.owner = atk.real_owner (whoopsie) Fixed gas grenades lasting forever. --- obituary.qc | 13 +++++-------- spy.qc | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/obituary.qc b/obituary.qc index 4409b24..f5d36cd 100644 --- a/obituary.qc +++ b/obituary.qc @@ -144,13 +144,13 @@ void (entity targ, entity atk) Give_Frags_Building = if (atk == targ) return; - atk.owner = atk.real_owner; + local entity ro = atk.real_owner; - if (atk.classname == "building_dispenser" && atk.martyr_enemy != atk.real_owner) - atk.real_owner = atk.martyr_enemy; + if (atk.classname == "building_dispenser" && atk.martyr_enemy) + ro = atk.martyr_enemy; - if ((((targ.classname == "player") && Teammate(atk.real_owner.team_no, targ.team_no)) || - Teammate(atk.real_owner.team_no, targ.real_owner.team_no)) && ((deathmsg != DMSG_TESLA) || + if ((((targ.classname == "player") && Teammate(ro.team_no, targ.team_no)) || + Teammate(ro.team_no, targ.real_owner.team_no)) && ((deathmsg != DMSG_TESLA) || !(atk.tf_items & NIT_SECURITY_CAMERA))) { if (targ.classname == "player") // More the victim than the owner's fault @@ -168,9 +168,6 @@ void (entity targ, entity atk) Give_Frags_Building = else atk.frags++; - if (atk.real_owner != atk.owner) - atk.real_owner = atk.owner; - Give_Frags_Player(atk.real_owner, atk); }; diff --git a/spy.qc b/spy.qc index ea532ca..6b66b40 100644 --- a/spy.qc +++ b/spy.qc @@ -745,7 +745,7 @@ void() GasGrenadeMakeGas = { // Damage deathmsg = DMSG_GREN_GAS; - if (self.heat = 0) + if (!self.heat) TF_T_Damage (te, NIL, self.owner, 20, TF_TD_IGNOREARMOUR, TF_TD_OTHER); else TF_T_Damage (te, NIL, self.owner, 40, TF_TD_IGNOREARMOUR, TF_TD_OTHER);