From: drjaska Date: Sat, 14 May 2022 13:40:25 +0000 (+0300) Subject: warmup start is cyan color, warmup end is red, savestates can not be loaded nor saved... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fheads%2Fdrjaska%2Fctscup;p=xonotic%2Fxonotic-data.pk3dir.git warmup start is cyan color, warmup end is red, savestates can not be loaded nor saved during game_stopped and will load 1 or more health --- diff --git a/qcsrc/common/gamemodes/gamemode/ctscup/sv_ctscup.qc b/qcsrc/common/gamemodes/gamemode/ctscup/sv_ctscup.qc index 833ca6548..c37e9bab3 100644 --- a/qcsrc/common/gamemodes/gamemode/ctscup/sv_ctscup.qc +++ b/qcsrc/common/gamemodes/gamemode/ctscup/sv_ctscup.qc @@ -491,7 +491,7 @@ bool CTSCUP_CanRoundStart() if (!tournamentStarted && (roundPlayers >= autocvar_g_ctscup_minplayers)) { PrintToChatAll(" \n"); - PrintToChatAll("^3W A R M U P started! \n"); + PrintToChatAll("^5W A R M U P started! \n"); PrintToChatAll(" \n"); return true; } @@ -543,7 +543,7 @@ bool CTSCUP_CheckRoundEnd() if (!tournamentStarted && (roundPlayers < autocvar_g_ctscup_minplayers)) { PrintToChatAll(" \n"); - PrintToChatAll("^3Not enough players! W A R M U P restarted! \n"); + PrintToChatAll("^5Not enough players! W A R M U P restarted! \n"); PrintToChatAll(" \n"); roundCounter = -1; game_stopped = true; @@ -590,8 +590,7 @@ bool CTSCUP_CheckRoundEnd() if (everyoneHasAClearTime) { PrintToChatAll(" \n"); - PrintToChatAll("^3Everyone has a clear time! Ending warmup and starting the tournament! \n"); - //PrintToChatAll(" \n"); + PrintToChatAll("^1Everyone has a clear time! Ending warmup and starting the tournament! \n"); roundCounter = -1; game_stopped = true; round_handler_Init(5, 1, autocvar_g_ctscup_maxroundlength); diff --git a/qcsrc/server/savestate.qc b/qcsrc/server/savestate.qc index 09d009415..89be374cc 100644 --- a/qcsrc/server/savestate.qc +++ b/qcsrc/server/savestate.qc @@ -2,7 +2,7 @@ void SaveSaveState(entity player) { - if (player.savestate) + if (player.savestate && !game_stopped) { // reset loads since last save counter player.savestate.loadCounter = 0; @@ -34,7 +34,7 @@ void SaveSaveState(entity player) bool LoadSaveState(entity player) { - if (player.savestate) + if (player.savestate && !game_stopped) { // store a counterfor loads since last save player.savestate.loadCounter++; @@ -52,7 +52,7 @@ bool LoadSaveState(entity player) SetResource(player, RES_PLASMA, GetResource(player.savestate, RES_PLASMA)); SetResource(player, RES_SHELLS, GetResource(player.savestate, RES_SHELLS)); SetResource(player, RES_FUEL, GetResource(player.savestate, RES_FUEL)); - SetResource(player, RES_HEALTH, GetResource(player.savestate, RES_HEALTH)); + SetResource(player, RES_HEALTH, max(1, GetResource(player.savestate, RES_HEALTH))); SetResource(player, RES_ARMOR, GetResource(player.savestate, RES_ARMOR)); STAT(WEAPONS, player) = STAT(WEAPONS, player.savestate); StatusEffects_copy(player.savestate, player.statuseffects, player.savestate.teleport_time);