Fixed Give_Frags_Building assigning atk.owner = atk.real_owner (whoopsie)

Fixed gas grenades lasting forever.
This commit is contained in:
Finny Merrill 2004-01-25 05:25:40 +00:00
parent df08ea9bb9
commit c6927c6b53
2 changed files with 6 additions and 9 deletions

View File

@ -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);
};

2
spy.qc
View File

@ -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);