Back to TPG

TPG.Duplication.GetGracePeriod

S🏷️ Duplication

Part of TPG namespace

TPG.Duplication.GetGracePeriod()
View on GitHub|gamemode/systems/sv_duplication.lua:81-86
📋 Has LDoc👁️ 0 viewsUpdated 1 month ago

Description

The grace window for the current map, in seconds. Reads the map config first so a map can override it, then TPG.Config.dupeGracePeriod. 0 (from either) disables the mechanic. Note the override actually takes effect, which was not true of every key a map block can carry: safezoneRadius was authored in every map in maps/_loader.lua and read by nobody for a long while, because every consumer went straight to TPG.Config.safezoneRadius. It reads through TPG.Maps.GetSafezoneRadius now, but the shape of that bug is the one to avoid when adding a per-map key: author the reader, not just the value.

Parameters

No parameters.

Returns

TypeDescription
numberSeconds; 0 if disabled.

Examples

No examples available.

Used In

No usages found in the codebase.