Part of TPG namespace
TPG.PropTracking.CanSpawn(ply, additionalWeight)📋 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
| Name | Type | Description |
|---|---|---|
ply | Player | |
additionalWeight? | number | Weight the pending spawn would add.(default: 0) |
Returns
| Type | Description |
|---|---|
boolean | |
string | Reason it was refused, if it was. |
Examples
No examples available.
Used In
No usages found in the codebase.