UpdateFrags(attacker, f);
}
-.entity kh_next;
-
string AppendItemcodes(string s, entity player)
{
for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
if(w != 0 || slot == 0)
s = strcat(s, ftos(w));
}
- if(time < player.strength_finished)
+ if(time < STAT(STRENGTH_FINISHED, player))
s = strcat(s, "S");
- if(time < player.invincible_finished)
+ if(time < STAT(INVINCIBLE_FINISHED, player))
s = strcat(s, "I");
- if(player.flagcarried != NULL)
- s = strcat(s, "F");
if(PHYS_INPUT_BUTTON_CHAT(player))
s = strcat(s, "T");
- if(player.kh_next)
- s = strcat(s, "K");
+ // TODO: include these codes as a flag on the item itself
+ MUTATOR_CALLHOOK(LogDeath_AppendItemCodes, player, s);
+ s = M_ARGV(1, string);
return s;
}
else
{
LOG_TRACEF(
- "Obituary_WeaponDeath(): ^1Deathtype ^7(%d)^1 has no notification for weapon %d!\n",
+ "Obituary_WeaponDeath(): ^1Deathtype ^7(%d)^1 has no notification for weapon %s!\n",
deathtype,
- death_weapon
+ death_weapon.netname
);
}
}
}
- if(deathtype != DEATH_HURTTRIGGER.m_id && deathtype != DEATH_TEAMCHANGE.m_id && deathtype != DEATH_AUTOTEAMCHANGE.m_id && STAT(FROZEN, targ))
+ if(STAT(FROZEN, targ) && !ITEM_DAMAGE_NEEDKILL(deathtype)
+ && deathtype != DEATH_TEAMCHANGE.m_id && deathtype != DEATH_AUTOTEAMCHANGE.m_id)
{
if(autocvar_g_frozen_revive_falldamage > 0 && deathtype == DEATH_FALL.m_id && damage >= autocvar_g_frozen_revive_falldamage)
{
force *= autocvar_g_frozen_force;
}
- if(IS_PLAYER(targ) && STAT(FROZEN, targ) && deathtype == DEATH_HURTTRIGGER.m_id && !autocvar_g_frozen_damage_trigger)
+ if(IS_PLAYER(targ) && STAT(FROZEN, targ)
+ && ITEM_DAMAGE_NEEDKILL(deathtype) && !autocvar_g_frozen_damage_trigger)
{
Send_Effect(EFFECT_TELEPORT, targ.origin, '0 0 0', 1);
- entity spot = SelectSpawnPoint (targ, false);
-
+ entity spot = SelectSpawnPoint(targ, false);
if(spot)
{
damage = 0;
}
float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector inflictorvelocity, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe,
- float inflictorselfdamage, float forceintensity, int deathtype, .entity weaponentity, entity directhitentity)
+ float inflictorselfdamage, float forceintensity, float forcezscale, int deathtype, .entity weaponentity, entity directhitentity)
// Returns total damage applies to creatures
{
entity targ;
force = force * (finaldmg / coredamage) * forceintensity;
hitloc = nearest;
- if(deathtype & WEP_BLASTER.m_id)
- force *= WEP_CVAR_BOTH(blaster, !(deathtype & HITTYPE_SECONDARY), force_zscale);
+ // apply special scaling along the z axis if set
+ // NOTE: 0 value is not allowed for compatibility, in the case of weapon cvars not being set
+ if(forcezscale)
+ force.z *= forcezscale;
if(targ != directhitentity)
{
float RadiusDamage(entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype, .entity weaponentity, entity directhitentity)
{
- return RadiusDamageForSource(inflictor, (inflictor.origin + (inflictor.mins + inflictor.maxs) * 0.5), inflictor.velocity, attacker, coredamage, edgedamage, rad, cantbe, mustbe, false, forceintensity, deathtype, weaponentity, directhitentity);
+ return RadiusDamageForSource(inflictor, (inflictor.origin + (inflictor.mins + inflictor.maxs) * 0.5), inflictor.velocity, attacker, coredamage, edgedamage, rad,
+ cantbe, mustbe, false, forceintensity, 1, deathtype, weaponentity, directhitentity);
}
bool Heal(entity targ, entity inflictor, float amount, float limit)