MCPcopy Create free account
hub / github.com/ValveSoftware/source-sdk-2013 / OnTakeDamage

Method OnTakeDamage

src/game/server/basecombatcharacter.cpp:2393–2477  ·  view source on GitHub ↗

============ OnTakeDamage The damage is coming from inflictor, but get mad at attacker This should be the only function that ever reduces health. bitsDamageType indicates the type of damage sustained, ie: DMG_SHOCK Time-based damage: only occurs while the NPC is within the trigger_hurt. When a NPC is poisoned via an arrow etc it takes all the poison damage at once. GLOBALS ASSUMED SET: g_iSk

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 11

Event_KilledFunction · 0.85
EnableCollisionsMethod · 0.80
UTIL_SmokeFunction · 0.70
GetDamageTypeMethod · 0.45
SparksMethod · 0.45
GetDamagePositionMethod · 0.45
RandomIntMethod · 0.45
GetAttackerMethod · 0.45
GetTeamNumberMethod · 0.45
StartMethod · 0.45

Tested by

no test coverage detected