return free_slots;
}
+bool queuePlayer(entity this)
+{
+ if(IsQueueNeeded(this) && !SpectatorWantsJoin(this))
+ {
+ if(autocvar_g_balance_teams)
+ TeamBalance_JoinBestTeam(this);
+ return true;
+ }
+ return false;
+}
+
bool joinAllowed(entity this)
{
if (CS(this).version_mismatch) return false;
if (MUTATOR_CALLHOOK(ForbidSpawn, this)) return false;
if (ShowTeamSelection(this)) return false;
if (this.wants_join) return false;
- if (IsQueueNeeded(this) && autocvar_g_balance_teams)
- {
- TeamBalance_JoinBestTeam(this);
- return false;
- }
+ if (queuePlayer(this)) return false;
return true;
}
player.wants_join = team_index; // Player queued to join
}
else
+ {
Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(player.team, INFO_JOIN_PLAY_TEAM), player.netname);
+ }
}
}