Garry's Mod Wiki

Revision Difference

GM:EntityRemoved#551753

<function name="EntityRemoved" parent="GM" type="hook"> <ishook>yes</ishook> <description> Called right before the removal of an entity. <note>⤶ This hook is called during clientside full updates. See <page>ENTITY:OnRemove#clientsidebehaviourremarks</page> for more information. **This is fixed on the dev branch**⤶ </note>⤶ Called right before removal of an entity. <warning>⤶ This hook is called clientside during full updates due to how networking works in the Source Engine. ⤶ This can happen when the client briefly loses connection to the server, and can be simulated via `cl_fullupdate` for testing purposes.⤶ </warning>⤶ </description> <realm>Shared</realm> <args> <arg name="ent" type="Entity">Entity being removed</arg> <arg name="fullUpdate" type="boolean">Whether the removal is happening due to a full update clientside.⤶ ⤶ The entity may or **may not** be recreated immediately after, depending on whether it is in the local player's [PVS](https://developer.valvesoftware.com/wiki/PVS "PVS - Valve Developer Community"). (See <page>Entity:IsDormant</page>)</arg>⤶ </args> </function>