Back to TPG

tpg.ent.controlpoint.server:UpdateColor

S🏷️ Controlpoint

Part of TPG namespace

ENT:UpdateColor()
View on GitHub|entities/entities/tpg_controlpoint/init.lua:216-230
📋 Has LDoc👁️ 0 viewsUpdated 1 month ago

Description

Point colour: team hue, brightness = how firmly it's held. Two things were wrong here in overtime. The ratio divided CapProgress by the CONFIGURED CapTimeMax while overtime clamps CapProgress to a much smaller effective ceiling (down to a tenth of it), so a fully-held point read as ratio ~0.1 and rendered as near-black -- you couldn't tell who owned it, which is exactly when it matters most. It divides by the ceiling actually in force now. Second, brightness ran all the way to 0 even outside overtime, so a point that was owned but freshly flipped was almost black too. Ownership is information, not decoration: MIN_OWNED keeps a held point unmistakably its team's colour, and the ratio only modulates the top of the range. Sets the entity's networked Color directly; there is no separate colour-sync net message.

Parameters

No parameters.

Returns

No return values documented.

Examples

No examples available.

Used In

No usages found in the codebase.