Back to TPG

tpg.ent.flag.server:GameplayStep

S🏷️ Flag

Part of TPG namespace

ENT:GameplayStep()
View on GitHub|entities/entities/tpg_flag/init.lua:200-245
📋 Has LDoc👁️ 0 viewsUpdated 1 month ago

Description

Per-state gameplay for one STEP: carry-timeout and delivery checks while carried, drop-timeout while dropped, and pickup scanning while home or dropped. Delivery is judged by TPG.Protection.IsInSafezone(c) when that module is loaded, falling back to a flat-radius check (ctfDeliverRadius, default 500) against TPG.State.spawns[c:Team()] otherwise -- the fallback path exists so this still works if load order ever puts this file ahead of TPG.Protection, but it uses a DIFFERENT radius/shape than the real safezone, so a flag near the safezone edge could read as delivered under one path and not the other depending on which is active. Pickup: the FIRST alive, teamed player found within PICKUP_RADIUS in player.GetAll() iteration order grabs it -- not the nearest one -- so if two teammates are both in range on the same tick, which one gets credited depends on player.GetAll()'s ordering, not proximity.

Parameters

No parameters.

Returns

No return values documented.

Examples

No examples available.

Used In

No usages found in the codebase.