From: drjaska Date: Fri, 13 May 2022 13:40:39 +0000 (+0300) Subject: fixed that with high speeds loading a low speed savestate caused to take splat damage X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2656c03e3fd48df715694afa4ff3c61a8daace1e;p=xonotic%2Fxonotic-data.pk3dir.git fixed that with high speeds loading a low speed savestate caused to take splat damage --- diff --git a/qcsrc/common/gamemodes/gamemode/ctscup/TODO.txt b/qcsrc/common/gamemodes/gamemode/ctscup/TODO.txt index 530826d24..6b7dbe06a 100644 --- a/qcsrc/common/gamemodes/gamemode/ctscup/TODO.txt +++ b/qcsrc/common/gamemodes/gamemode/ctscup/TODO.txt @@ -1,8 +1,5 @@ CTS Cup TODO list: -Savestates: -- FIXME?: Splat damage is dealt AFTER health restoring of savestate loading if the player were to first save a savestate with low speed, get to high speeds and then load the savestate - HUD: - Display current round's players - Display checkpoint splits diff --git a/qcsrc/server/savestate.qc b/qcsrc/server/savestate.qc index 5b6057d90..09d009415 100644 --- a/qcsrc/server/savestate.qc +++ b/qcsrc/server/savestate.qc @@ -12,6 +12,7 @@ void SaveSaveState(entity player) player.savestate.v_angle = player.v_angle; player.savestate.angles = player.angles; player.savestate.velocity = player.velocity; + player.savestate.oldvelocity = player.oldvelocity; SetResource(player.savestate, RES_ROCKETS, GetResource(player, RES_ROCKETS)); SetResource(player.savestate, RES_BULLETS, GetResource(player, RES_BULLETS)); SetResource(player.savestate, RES_CELLS, GetResource(player, RES_CELLS)); @@ -44,6 +45,7 @@ bool LoadSaveState(entity player) player.angles = player.savestate.angles; player.fixangle = true; player.velocity = player.savestate.velocity; + player.oldvelocity = player.savestate.oldvelocity; SetResource(player, RES_ROCKETS, GetResource(player.savestate, RES_ROCKETS)); SetResource(player, RES_BULLETS, GetResource(player.savestate, RES_BULLETS)); SetResource(player, RES_CELLS, GetResource(player.savestate, RES_CELLS));