From: terencehill Date: Wed, 6 Mar 2013 20:18:27 +0000 (+0100) Subject: Calling Arena_AddChallengers() before the game starts g_start_delay works as expected... X-Git-Tag: xonotic-v0.7.0~61^2~26 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=388d75de0d7edf1406d0275014dacc08e54779a5;p=xonotic%2Fxonotic-data.pk3dir.git Calling Arena_AddChallengers() before the game starts g_start_delay works as expected in Arena too --- diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index b5e636b6f..42d729caf 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -423,8 +423,7 @@ void ReadyRestart_force() checkrules_suddendeathend = checkrules_overtimesadded = checkrules_suddendeathwarning = 0; readyrestart_happened = 1; - game_starttime = time; - if(!g_arena) { game_starttime += RESTART_COUNTDOWN; } + game_starttime = time + RESTART_COUNTDOWN; // clear alivetime FOR_EACH_CLIENT(tmp_player) @@ -451,7 +450,7 @@ void ReadyRestart_force() } //initiate the restart-countdown-announcer entity - if(autocvar_sv_ready_restart_after_countdown && !g_arena) + if(autocvar_sv_ready_restart_after_countdown) { restart_timer = spawn(); restart_timer.think = ReadyRestart_think; diff --git a/qcsrc/server/mutators/gamemode_arena.qc b/qcsrc/server/mutators/gamemode_arena.qc index 8b7c9135a..f5f7eb136 100644 --- a/qcsrc/server/mutators/gamemode_arena.qc +++ b/qcsrc/server/mutators/gamemode_arena.qc @@ -244,11 +244,9 @@ MUTATOR_HOOKFUNCTION(arena_PlayerDies) MUTATOR_HOOKFUNCTION(arena_SV_StartFrame) { - if(arena_roundbased) return 1; - if(time <= game_starttime) return 1; if(gameover) return 1; - - Arena_AddChallengers(); + if(time <= game_starttime || !arena_roundbased) + Arena_AddChallengers(); return 1; }