}
.int team_selected;
-void LeaveSpectatorMode(entity this)
+void JoinOrShowTeamSelection(entity this)
{
if(!teamplay || autocvar_g_campaign || autocvar_g_balance_teams || this.team_selected || (this.wasplayer && autocvar_g_changeteam_banned) || this.team_forced > 0)
{
if(this.flags & FL_SPAWNING)
{
this.flags &= ~FL_SPAWNING;
- LeaveSpectatorMode(this);
+ JoinOrShowTeamSelection(this);
return;
}
}
if(this.flags & FL_SPAWNING)
{
this.flags &= ~FL_SPAWNING;
- LeaveSpectatorMode(this);
+ JoinOrShowTeamSelection(this);
return;
}
}
}
bool spawnAllowed(entity this);
-void LeaveSpectatorMode(entity this);
+void JoinOrShowTeamSelection(entity this);
void ClientCommand_join(entity caller, float request)
{
switch (request)
if (!gameover)
if (IS_CLIENT(caller) && !IS_PLAYER(caller))
if (spawnAllowed(caller))
- LeaveSpectatorMode(caller);
+ JoinOrShowTeamSelection(caller);
return; // never fall through to usage
}