ENTITY:DoImpactEffect
Description
Called so the entity can override the bullet impact effects it makes. This is called when the entity itself fires bullets via Entity:FireBullets, not when it gets hit.
This hook only works for the "anim" type entities.
Arguments
Returns
Example
Makes the ENT have the AR2 bullet impact effect.
function ENT:DoImpactEffect( tr, nDamageType )
if ( tr.HitSky ) then return end
local effectdata = EffectData()
effectdata:SetOrigin( tr.HitPos + tr.HitNormal )
effectdata:SetNormal( tr.HitNormal )
util.Effect( "AR2Impact", effectdata )
end