Back to TPG

tpg.spawning:PlayerSpawn

S🏷️ Spawning

Part of TPG namespace

GM:PlayerSpawn(ply)
View on GitHub|gamemode/player/sv_spawning.lua:163-198
📋 Has LDoc👁️ 0 viewsUpdated 1 month ago

Description

Position, colour, protect and kit a player on every spawn. On a team: moves them to this round's published spawn if one exists yet (before that, the engine's own spawn choice is trusted, since it beats anything this module has to offer), sets team colours, and starts spawn protection (longer while the player's team is the underdog, via TPG.Underdog.GetProtectionTime if loaded) with god mode. Off a team (spectator): god mode only, permanently, since spectators are non-combatant. Either way, EnsureInWorld runs after positioning as the final safety check, and TPG.Loadout.Apply runs last so a player who got moved by the safety check still gets kitted at their real position.

Parameters

NameTypeDescription
plyPlayer

Returns

No return values documented.

Examples

No examples available.

Used In

No usages found in the codebase.