Back to TPG

TPG.Maps.RemoveNearest

S🏷️ Custompoints

Part of TPG namespace

TPG.Maps.RemoveNearest(pos, radius)
View on GitHub|gamemode/maps/sv_custom_points.lua:104-121
📋 Has LDoc👁️ 0 viewsUpdated 1 month ago

Description

Remove whichever placed point is closest to pos, within radius. Used by the point tool's Reload (R) action to delete the point you're aiming near. Ties are not resolved by placement order -- < only replaces the best match on a strictly closer distance, so the first-seen point wins a tie.

Parameters

NameTypeDescription
posVectorSearch origin (typically an eye-trace hit).
radius?numberSearch radius in units.(default: 250)

Returns

TypeDescription
tableThe removed point record, or nil if nothing was in range.

Examples

No examples available.

Used In

No usages found in the codebase.