cw_breach entity
Entity defined in entities/entities/cw_breach
Summary
Methods
EntityBreached hook for the attached entity.Methods
Detonates the breach, removes it and fires the EntityBreached hook for the attached entity.
Parameters
- activator Entity Whoever set off the breach, usually the attacker that destroyed it
Spawns a broken padlock prop at the breach that decays after 30 seconds.
Draws the breach model.
Plays the breach detonation effect and impact sound at the breach position.
ENT:HUDPaintTargetID(x, y, alpha)
client gamemodes/cwhl2rp/schema/entities/entities/cw_breach/cl_init.lua:6Draws the breach name and usage hint as the target ID.
Parameters
- x
- y
- alpha
Sets up the breach padlock model and physics.
ENT:OnTakeDamage(damageInfo)
server gamemodes/cwhl2rp/schema/entities/entities/cw_breach/init.lua:93Subtracts the damage from the breach's health and breaches the entity when it reaches 0.
Parameters
- damageInfo
ENT:SetBreachEntity(entity, trace)
server gamemodes/cwhl2rp/schema/entities/entities/cw_breach/init.lua:57Attaches the breach to an entity at the traced hit position.
The breach is parented to the entity, faces along the hit normal, is removed together with the
entity and gets 5 health. The entity's breach field is set to the breach.
Parameters
- entity Entity The door or entity to breach
- trace Map Trace result whose
HitPosandHitNormalplace the breach
Always transmits the breach to every client.