]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'z411/srestart' into 'master'
authorterencehill <piuntn@gmail.com>
Sun, 2 Jan 2022 09:55:44 +0000 (09:55 +0000)
committerterencehill <piuntn@gmail.com>
Sun, 2 Jan 2022 09:55:44 +0000 (09:55 +0000)
Add resetmatch command to soft restart the map without the need to respawn the server [restart] (fixes #2609)

Closes #2609

See merge request xonotic/xonotic-data.pk3dir!940

1  2 
qcsrc/server/command/sv_cmd.qc
qcsrc/server/command/vote.qc
qcsrc/server/world.qc
xonotic-server.cfg

Simple merge
index f99c182466a535ba0273044045344df0ba748b7b,b3aa8ca22e9333e3cbbce4256665b69f90c4e12c..aefbc3fd1c502896cd6cfc41c4dc67053bdbe080
@@@ -450,14 -436,13 +442,11 @@@ void ReadyRestart_force(
        FOREACH_CLIENT(IS_PLAYER(it), {
                it.alivetime = 0;
                CS(it).killcount = 0;
 -              float val = PlayerStats_GameReport_Event_Player(it, PLAYERSTATS_ALIVETIME, 0);
 -              PlayerStats_GameReport_Event_Player(it, PLAYERSTATS_ALIVETIME, -val);
        });
  
-       restart_mapalreadyrestarted = false; // reset this var, needed when cvar sv_ready_restart_repeatable is in use
-       // disable the warmup global for the server
-       if(warmup_stage)
+       // if we're ending the warmup stage call the corresponding hook
+       if(!warmup_stage)
                localcmd("\nsv_hook_warmupend\n");
-       warmup_stage = 0;                // once the game is restarted the game is in match stage
  
        // reset the .ready status of all players (also spectators)
        FOREACH_CLIENT(IS_REAL_CLIENT(it), { it.ready = false; });
Simple merge
Simple merge