Back to TPG

TPG.Rounds.CleanupMap

S🏷️ Rounds

Part of TPG namespace

TPG.Rounds.CleanupMap()
View on GitHub|gamemode/core/sv_rounds.lua:94-119
📋 Has LDoc👁️ 0 viewsUpdated 1 month ago

Description

Clear the map between rounds, leaving spectators' builds standing. game.CleanUpMap has no per-entity opt-out -- its only filter is by class, and a spectator's props are the same prop_physics as everyone else's -- so exempting an owner means not calling it. That is a real cost: it also restores map entities to their starting state, and a hand-rolled sweep does not. So it is still the path taken whenever no spectator owns anything, which is nearly every round; the sweep is the exception, not the rule. The sweep fires PreCleanupMap/PostCleanupMap itself, because addons (ACE and CFW among them) drop cached state on those and would otherwise be left holding references to entities that have gone.

Parameters

No parameters.

Returns

No return values documented.

Examples

No examples available.

Used In

No usages found in the codebase.