Back to TPG

TPG.CTF.RollFlagPoint

S🏷️ Ctf

Part of TPG namespace

TPG.CTF.RollFlagPoint()
View on GitHub|gamemode/objectives/sv_ctf.lua:83-99
📋 Has LDoc👁️ 0 viewsUpdated 1 month ago

Description

Pick where the flag lives for this round. An admin-placed point always wins outright. Otherwise the KOTH point keeps at least a 50% share (TPG.Config.ctfKothWeight, clamped to 0.5 and up) and the rest is split evenly among the map's CP capture points, so the flag does not always sit on the same hill. CP points within about 256 units of the KOTH point are skipped, so the roll is not wasted on what is effectively the same spot. spawns and the round has nothing to score with.

Parameters

No parameters.

Returns

TypeDescription
Vectornil if the map has no KOTH point, in which case no flag

Examples

No examples available.

Used In

No usages found in the codebase.