Garry's Mod Wiki

Revision Difference

InvalidateInternalEntityCache#564950

<function name="InvalidateInternalEntityCache" parent="Global" type="libraryfunc"> <description> <bug issue="6387">Argument ent returns a Boolean and an entity. In addition, the PlayerCache variable is reset to nil each time an entity appears or is deleted, whether it's a player or not.</bug>⤶ <internal></internal> Called by the engine before <page>GM:OnEntityCreated</page> and after <page>GM:EntityRemoved</page> hooks are called. Internally used to clear the <page>player.Iterator</page> and <page>ents.Iterator</page> cache </description> <realm>Shared</realm> <added>2025.06.12</added> <args> <arg name="ent" type="Entity">An entity that is about to be removed or that has just been created.</arg> </args> </function>