#include "weapons/accuracy.qh"
#include "weapons/csqcprojectile.qh"
#include "weapons/selection.qh"
+#include "../common/buffs.qh"
#include "../common/constants.qh"
#include "../common/deathtypes.qh"
#include "../common/notifications.qh"
+#include "../common/movetypes/movetypes.qh"
#include "../common/playerstats.qh"
#include "../common/teams.qh"
#include "../common/util.qh"
Net_LinkEntity(e, false, 0.2, Damage_DamageInfo_SendEntity);
}
-float IsFlying(entity a)
-{
- if(a.flags & FL_ONGROUND)
- return 0;
- if(a.waterlevel >= WATERLEVEL_SWIMMING)
- return 0;
- traceline(a.origin, a.origin - '0 0 48', MOVE_NORMAL, a);
- if(trace_fraction < 1)
- return 0;
- return 1;
-}
-
void UpdateFrags(entity player, float f)
{
PlayerTeamScore_AddScore(player, f);
entity oldself;
oldself = self;
self = attacker;
- frag_attacker = attacker;
- frag_target = targ;
- frag_score = f;
- if(MUTATOR_CALLHOOK(GiveFragsForKill))
+ if(MUTATOR_CALLHOOK(GiveFragsForKill, attacker, targ, f))
{
f = frag_score;
self = oldself;
);
}
+ float f3 = 0;
+ if(deathtype == DEATH_BUFF)
+ f3 = attacker.buffs;
+
if (!Obituary_WeaponDeath(targ, true, deathtype, targ.netname, attacker.netname, deathlocation, targ.killcount, kill_count_to_attacker))
- Obituary_SpecialDeath(targ, true, deathtype, targ.netname, attacker.netname, deathlocation, targ.killcount, kill_count_to_attacker, 0);
+ Obituary_SpecialDeath(targ, true, deathtype, targ.netname, attacker.netname, deathlocation, targ.killcount, kill_count_to_attacker, f3);
}
}
// count the damage
if(attacker)
if(!targ.deadflag)
- if(deathtype != DEATH_BUFF_VENGEANCE)
+ if(deathtype != DEATH_BUFF)
if(targ.takedamage == DAMAGE_AIM)
if(targ != attacker)
{
farcent.think = SUB_Remove;
}
else
+ {
self.velocity = self.velocity + farce;
+ self.move_velocity = self.velocity;
+ }
self.flags &= ~FL_ONGROUND;
+ self.move_flags &= ~FL_ONGROUND;
UpdateCSQCProjectile(self);
}
// apply damage
RadiusDamage_running = 0;
if(!DEATH_ISSPECIAL(deathtype))
- accuracy_add(attacker, DEATH_WEAPONOFWEAPONDEATH(deathtype), 0, min(coredamage, stat_damagedone));
+ accuracy_add(attacker, DEATH_WEAPONOF(deathtype), 0, min(coredamage, stat_damagedone));
return total_damage_to_creatures;
}
}
}
if(accuracy_isgooddamage(o, e))
- accuracy_add(o, DEATH_WEAPONOFWEAPONDEATH(dt), 0, max(0, totaldamage - mindamage));
+ accuracy_add(o, DEATH_WEAPONOF(dt), 0, max(0, totaldamage - mindamage));
return max(0, totaldamage - mindamage); // can never be negative, but to make sure
}
else
e.fire_owner = o;
e.fire_hitsound = false;
if(accuracy_isgooddamage(o, e))
- accuracy_add(o, DEATH_WEAPONOFWEAPONDEATH(dt), 0, d);
+ accuracy_add(o, DEATH_WEAPONOF(dt), 0, d);
return d;
}
}