#include <common/physics/movetypes/movetypes.qh>
#include <common/physics/player.qh>
#include <common/playerstats.qh>
+#include <common/resources/sv_resources.qh>
#include <common/state.qh>
#include <common/teams.qh>
#include <common/util.qh>
#include <server/items/items.qh>
#include <server/main.qh>
#include <server/mutators/_mod.qh>
-#include <server/resources.qh>
#include <server/scores.qh>
#include <server/spawnpoints.qh>
#include <server/teamplay.qh>
// These are ALWAYS lethal
// No damage modification here
// Instead, prepare the victim for his death...
- SetResourceExplicit(targ, RES_ARMOR, 0);
+ if(deathtype == DEATH_TEAMCHANGE.m_id || deathtype == DEATH_AUTOTEAMCHANGE.m_id)
+ {
+ SetResourceExplicit(targ, RES_ARMOR, 0);
+ SetResourceExplicit(targ, RES_HEALTH, 0.9); // this is < 1
+ }
StatusEffects_remove(STATUSEFFECT_SpawnShield, targ, STATUSEFFECT_REMOVE_CLEAR);
- SetResourceExplicit(targ, RES_HEALTH, 0.9); // this is < 1
targ.flags -= targ.flags & FL_GODMODE;
damage = 100000;
}
if(PHYS_INPUT_BUTTON_CHAT(victim))
attacker.typehitsound += 1;
else
- attacker.damage_dealt += damage;
+ attacker.hitsound_damage_dealt += damage;
}
impressive_hits += 1;
t = min(frametime, fireendtime - time);
d = e.fire_damagepersec * t;
- hi = e.fire_owner.damage_dealt;
+ hi = e.fire_owner.hitsound_damage_dealt;
ty = e.fire_owner.typehitsound;
Damage(e, e, e.fire_owner, d, e.fire_deathtype, DMG_NOWEP, e.origin, '0 0 0');
if(e.fire_hitsound && e.fire_owner)
{
- e.fire_owner.damage_dealt = hi;
+ e.fire_owner.hitsound_damage_dealt = hi;
e.fire_owner.typehitsound = ty;
}
e.fire_hitsound = true;