Part of TPG namespace
TPG.Spawning.EnsureInWorld(ply)📋 Has LDoc👁️ 0 viewsUpdated 1 month ago
Description
Last line of defence, run on every spawn: if wherever the player ended up isn't inside the world, move them somewhere that is via FallbackPos. Cheap (one trace-free bounds check) and it can't misfire, since a legitimate spawn is always in the world and never exactly at the origin. If even the fallback finds nothing, this leaves the player where the engine put them and logs a one-time warning that the map has no usable spawn at all, since that means the map is unplayable as configured.
Parameters
| Name | Type | Description |
|---|---|---|
ply | Player |
Returns
No return values documented.
Examples
No examples available.
Used In
No usages found in the codebase.