seta g_waypointsprite_tactical 1 "tactical overlay on turrets when in a vehicle"
seta cl_damagetext "1" "Draw damage dealt where you hit the enemy"
- seta cl_damagetext_format "-{total}" "How to format the damage text. {health}, {armor}, {total}"
+ seta cl_damagetext_format "-{total}" "How to format the damage text. {health}, {armor}, {total}, {potential}, {potential_health}"
seta cl_damagetext_color "1 1 0" "Damage text color"
seta cl_damagetext_color_per_weapon "0" "Damage text uses weapon color"
seta cl_damagetext_size "8" "Damage text font size"
seta cl_damagetext_velocity "0 0 20" "Damage text move direction"
seta cl_damagetext_offset "0 -40 0" "Damage text offset"
seta cl_damagetext_accumulate_range "30" "Damage text spawned within this range is accumulated"
+seta cl_damagetext_accumulate_alpha_rel "0.65" "Only update existing damage text when it's above this much percentage (0 to 1) of the starting alpha"
seta cl_damagetext_friendlyfire "1" "Show damage text for friendlyfire too"
seta cl_damagetext_friendlyfire_color "1 0 0" "Damage text color for friendlyfire"
/** armor */ i(float, MUTATOR_ARGV_3_float) \
/** location */ i(vector, MUTATOR_ARGV_4_vector) \
/** deathtype */ i(int, MUTATOR_ARGV_5_int) \
+ /** potential_damage */ i(float, MUTATOR_ARGV_6_float) \
/**/
MUTATOR_HOOKABLE(PlayerDamaged, EV_PlayerDamaged);
/**
* called when a vehicle initializes
- * return false to remove the vehicle
+ * return true to remove the vehicle
*/
#define EV_VehicleInit(i, o) \
/** vehicle */ i(entity, MUTATOR_ARGV_0_entity) \
clone.iscreature = this.iscreature;
clone.teleportable = this.teleportable;
clone.damagedbycontents = this.damagedbycontents;
+ if(clone.damagedbycontents)
+ IL_PUSH(g_damagedbycontents, clone);
clone.angles = this.angles;
clone.v_angle = this.v_angle;
clone.avelocity = this.avelocity;
this.alpha = -1;
this.solid = SOLID_NOT; // restore later
this.takedamage = DAMAGE_NO; // restore later
+ if(this.damagedbycontents)
+ IL_REMOVE(g_damagedbycontents, this);
this.damagedbycontents = false;
}
}
{
WeaponStats_LogDamage(awep.m_id, abot, PS(this).m_weapon.m_id, vbot, dh + da);
}
- if (dh + da)
+ if (damage)
{
- MUTATOR_CALLHOOK(PlayerDamaged, attacker, this, dh, da, hitloc, deathtype);
+ MUTATOR_CALLHOOK(PlayerDamaged, attacker, this, dh, da, hitloc, deathtype, damage);
}
if (this.health < 1)