Back to TPG

TPG.Repair.Update

S🏷️ Repair

Part of TPG namespace

TPG.Repair.Update(ply, inSafezone)
View on GitHub|gamemode/player/sv_repair.lua:60-71
📋 Has LDoc👁️ 0 viewsUpdated 1 month ago

Description

Give or take the repair torch for one player, for this frame. Safe to call every frame: both branches check what the player is already holding first, so a player standing still in their safezone is not handed a new torch sixty-six times a second. A player who had the torch out when they leave the zone loses it mid-swing and the engine picks another weapon for them. That is deliberate and is the whole rule -- a grace period would be a window to weld in, which is what the safezone condition exists to prevent.

Parameters

NameTypeDescription
plyPlayer
inSafezonebooleanWhether they are in their OWN safezone this frame.

Returns

No return values documented.

Examples

No examples available.

Used In

No usages found in the codebase.