Revision Difference
CTakeDamageInfo:GetInflictor#517583
<function name="GetInflictor" parent="CTakeDamageInfo" type="classfunc">
<description>
Returns the inflictor of the damage. This is not necessarily a weapon.
For hitscan weapons this is the weapon.
For projectile weapons this is the projectile.
For a more reliable method of getting the weapon that damaged an entity, use [GetAttacker](/gmod/CTakeDamageInfo/GetAttacker) with [GetActiveWeapon](/gmod/Player/GetActiveWeapon).
For a more reliable method of getting the weapon that damaged an entity, use <page text="GetAttacker">CTakeDamageInfo:GetAttacker</page> with <page text="GetActiveWeapon">Player:GetActiveWeapon</page>.
</description>
<realm>Shared</realm>
<rets>
<ret name="" type="Entity">The inflictor</ret>
</rets>
</function>