Back to TPG

TPG.PropTracking.CanSpawn

S🏷️ Proptracking

Part of TPG namespace

TPG.PropTracking.CanSpawn(ply, additionalWeight)
View on GitHub|gamemode/systems/sv_proptracking.lua:170-190
📋 Has LDoc👁️ 0 viewsUpdated 1 month ago

Description

Would spawning this add-on push the player's team over any shared limit. Not currently called anywhere in this codebase -- the actual spawn-time enforcement lives in sv_duplication.lua, split across two places that do not agree on the comparison: * its post-paste check (in the AdvDupe_FinishPasting handler) uses >, strictly over, for points, weight and props alike; * its PlayerSpawnProp gate uses >=, at-or-over, on props only. This function uses >= throughout, so if it is ever wired back in it will refuse a team at exactly the cap on all three axes, which matches the prop gate but is one build stricter than the paste check.

Parameters

NameTypeDescription
plyPlayer
additionalWeight?numberWeight the pending spawn would add.(default: 0)

Returns

TypeDescription
boolean
stringReason it was refused, if it was.

Examples

No examples available.

Used In

No usages found in the codebase.