]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Calling Arena_AddChallengers() before the game starts g_start_delay works as expected...
authorterencehill <piuntn@gmail.com>
Wed, 6 Mar 2013 20:18:27 +0000 (21:18 +0100)
committerterencehill <piuntn@gmail.com>
Wed, 6 Mar 2013 20:18:27 +0000 (21:18 +0100)
qcsrc/server/command/vote.qc
qcsrc/server/mutators/gamemode_arena.qc

index b5e636b6f39c84a4e9ca6346e99c047e832297b0..42d729caf6acb79a556cac085b65ce62d6aa478b 100644 (file)
@@ -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;
index 8b7c9135ad2cbe8d95ebee0e1f6c144295839f38..f5f7eb13664ad4d1020d8988d7cc80c82e155f5b 100644 (file)
@@ -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;
 }