#include "../common/animdecide.qh"
+void Drop_Special_Items(entity player)
+{
+ // called when the player has become stuck or frozen
+ // so objective items aren't stuck with the player
+
+ MUTATOR_CALLHOOK(DropSpecialItems, player);
+}
+
void CopyBody_Think(void)
{SELFPARAM();
if(self.CopyBody_nextthink && time > self.CopyBody_nextthink)
self.dmg_take = self.dmg_take + take;//max(take - 10, 0);
self.dmg_inflictor = inflictor;
- float abot, vbot;
- abot = (IS_BOT_CLIENT(attacker));
- vbot = (IS_BOT_CLIENT(self));
+ if (self != attacker) {
+ float realdmg = damage - excess;
+ if (IS_PLAYER(attacker)) {
+ PlayerScore_Add(attacker, SP_DMG, realdmg);
+ }
+ if (IS_PLAYER(self)) {
+ PlayerScore_Add(self, SP_DMGTAKEN, realdmg);
+ }
+ }
+
+ bool abot = (IS_BOT_CLIENT(attacker));
+ bool vbot = (IS_BOT_CLIENT(self));
valid_damage_for_weaponstats = 0;
Weapon awep = WEP_Null;
dh = dh - max(self.health, 0);
da = da - max(self.armorvalue, 0);
WeaponStats_LogDamage(awep.m_id, abot, self.weapon, vbot, dh + da);
- MUTATOR_CALLHOOK(PlayerDamaged, attacker, self, dh, da, hitloc);
+ MUTATOR_CALLHOOK(PlayerDamaged, attacker, self, dh, da, hitloc, deathtype);
}
if (self.health < 1)