From: terencehill Date: Sun, 2 Jan 2022 09:55:44 +0000 (+0000) Subject: Merge branch 'z411/srestart' into 'master' X-Git-Tag: xonotic-v0.8.5~253 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e7c23fa6ac0a04b00f9f709997ec4b8df861fc36;p=xonotic%2Fxonotic-data.pk3dir.git Merge branch 'z411/srestart' into 'master' 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 --- e7c23fa6ac0a04b00f9f709997ec4b8df861fc36 diff --cc qcsrc/server/command/vote.qc index f99c18246,b3aa8ca22..aefbc3fd1 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@@ -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; });