GM:DrawPhysgunBeam
boolean GM:DrawPhysgunBeam( Player ply, Weapon physgun, boolean enabled, Entity target, number physBone, Vector hitPos )
Description
Allows you to override physgun effects rendering.
This is still called when
physgun_drawbeams
is set to 0
, because this hook is also capable of overriding physgun sprite effects, while the convar does not.Arguments
5 number physBone
ID of the physics bone (PhysObj) we are grabbing at. Use Entity:TranslatePhysBoneToBone to translate to an actual bone.
Returns
Example
Example code that will draw a direct line from the physgun to the target.