]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/client.qc
Merge branch 'terencehill/campaign_restart_level' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / client.qc
index bacb82e071429c219127ce07e5cc15888d39ff57..7b0c7ba29e8d226ca42a1847490bb92bdbda0ab8 100644 (file)
@@ -1953,6 +1953,9 @@ bool ShowTeamSelection(entity this)
 }
 void Join(entity this)
 {
+       if (autocvar_g_campaign && !campaign_bots_may_start && !game_stopped && time >= game_starttime)
+               ReadyRestart(true);
+
        TRANSMUTE(Player, this);
 
        if(!this.team_selected)
@@ -2537,7 +2540,6 @@ void PlayerPreThink (entity this)
                        || (!(autocvar_sv_spectate || autocvar_g_campaign || (Player_GetForcedTeamIndex(this) == TEAM_FORCE_SPECTATOR))
                                && (!teamplay || autocvar_g_balance_teams)))
                {
-                       campaign_bots_may_start = true;
                        if(joinAllowed(this))
                                Join(this);
                        return;