]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fixed that with high speeds loading a low speed savestate caused to take splat damage
authordrjaska <drjaska83@gmail.com>
Fri, 13 May 2022 13:40:39 +0000 (16:40 +0300)
committerdrjaska <drjaska83@gmail.com>
Fri, 13 May 2022 13:40:39 +0000 (16:40 +0300)
qcsrc/common/gamemodes/gamemode/ctscup/TODO.txt
qcsrc/server/savestate.qc

index 530826d240d1ff80d711c6ac2a1292df67c178ef..6b7dbe06a699f67b2d4d25b8e6575b89def1b35a 100644 (file)
@@ -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
index 5b6057d906ee03867b0dc9fc437cdf9960732d35..09d009415c0c09cce602963da38120ae5c31b2b8 100644 (file)
@@ -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));