GM:EntityRemoved
Description
Called right before removal of an entity.
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.
Arguments
2 boolean fullUpdate
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. (See Entity:IsDormant)
Example
Adds all sent_ball's into a list, which is cleared when they are removed.