note: documentation is released as-is and reports of any inaccuracies will be ignored
CTFPlayer::ModifyDamageInfo
CTFPlayer::OnTakeDamage
- If attacker is carrying
RUNE_STRENGTH
, scale damage by 2.0f. CTFGameRules::ApplyOnDamageModifyRules
CTFWeaponBase::ApplyOnHitAttributes
- If phasing:
CTFPlayer::ApplyPushFromDamage
- Otherwise:
CBaseCombatCharacter::OnTakeDamage
(bypasses override onCBasePlayer
)- If lifestate is alive:
CTFPlayer::OnTakeDamage_Alive
CTFGameRules::ApplyOnDamageAliveModifyRules
CTFPlayer::ApplyPushFromDamage
- If lifestate is alive:
CTFWeaponBase::ApplyOnInjuredAttributes
on victim's weaponCTFWeaponBase::ApplyPostHitEffects
on attacker's weaponCTFPlayer::OnDealtDamage
on attacker
- If attacker is carrying
- Called before damage is applied.
- Only used for scaling damage against sentry targets (8185700)
- Applies minicrit / critical alterations.
- Applies distance rampup / falloff modifiers.
- Applies (mini)crit damage modifiers.
- The return value controls the actual damage taken. This allows for modifying the result independently of any damage forces.
- However, Mad Milk effects still perform healing based on the original damage.
- It sounds like you should be able to preserve the damage force by using
m_flDamageForForce
, but it doesn't appear to work in practice.
- It sounds like you should be able to preserve the damage force by using
- A return value of -1.0f indicates a "hard out", which bypasses additional damage effects in
CTFPlayer::OnTakeDamage_Alive
.
- This does not get called if the target is invulnerable. Target may be a non-player entity.
- Attribute classes that are applied here:
add_onhit_addammo
extra_damage_on_hit
- (Attributes past this point are only applied to player enemies and halloween bosses.)
reveal_cloaked_victim_on_hit
reveal_disguised_victim_on_hit
- (Attributes past this point are not applied if the target is disguised or from burn damage.)
add_onhit_addhealth
charge_meter_on_hit
speed_boost_on_hit
add_onhit_ubercharge
rage_on_hit
boost_on_damage
aoe_heal_chance
crits_on_damage
stun_on_damage
aoe_blast_on_damage
generate_rage_on_dmg
mult_onhit_enemyspeed
mult_onhit_enemyspeed_major
mark_for_death
stun_waist_high_airborne
- Called on a victim's active weapon; damage must be applied by a player.
- Currently used for the following attribute classes:
melts_in_fire
(only applicable to Knife-based items)become_fireproof_on_hit_by_fire
(applicable to all weapons)
- Called on an attacker's weapon when damage has been applied to another player.
- Used for the following attribute classes:
scattergun_knockback_mult
(only applicable to Scatterguns with the ability to inflict knockback)- For all weapons:
subtract_victim_medigun_charge_onhit
subtract_victim_cloak_on_hit
- Called on the attacker when damage was applied. Victim can be any entity; not just players.
- This is only used for DPS statistics tracking.