damage_attacker = attacker;
attacker_save = attacker;
- if(IS_PLAYER(targ))
- {
- for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
- {
- .entity weaponentity = weaponentities[slot];
- if(targ.(weaponentity).hook && targ.(weaponentity).hook.aiment == attacker)
- RemoveHook(targ.(weaponentity).hook);
- }
- }
-
// special rule: gravity bomb does not hit team mates (other than for disconnecting the hook)
if(DEATH_ISWEAPON(deathtype, WEP_HOOK) || DEATH_ISWEAPON(deathtype, WEP_TUBA))
{
mirrordamage = M_ARGV(5, float);
force = M_ARGV(6, vector);
+ if(IS_PLAYER(targ) && damage > 0 && attacker)
+ {
+ for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
+ {
+ .entity weaponentity = weaponentities[slot];
+ if(targ.(weaponentity).hook && targ.(weaponentity).hook.aiment == attacker)
+ RemoveHook(targ.(weaponentity).hook);
+ }
+ }
+
if(STAT(FROZEN, targ))
if(deathtype != DEATH_HURTTRIGGER.m_id && deathtype != DEATH_TEAMCHANGE.m_id && deathtype != DEATH_AUTOTEAMCHANGE.m_id)
{