From d88a9bbc5ce27de10f1a88c93955f5035936565a Mon Sep 17 00:00:00 2001 From: Die4Ever Date: Tue, 13 Aug 2024 11:48:51 -0500 Subject: [PATCH] more experiments with slowing down the player during saving the quicksave function unsets the LevelAction in the same frame, so ProcessMove never sees it, so we check for high DeltaTime too we could make the quicksave se tthe LevelAction along with some bool to signify that it should be cleared, but this works well too --- DXRBalance/DeusEx/Classes/BalancePlayer.uc | 3 ++- DXRModules/DeusEx/Classes/DXRAutosave.uc | 11 +++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/DXRBalance/DeusEx/Classes/BalancePlayer.uc b/DXRBalance/DeusEx/Classes/BalancePlayer.uc index 644a2023f..88325eb80 100644 --- a/DXRBalance/DeusEx/Classes/BalancePlayer.uc +++ b/DXRBalance/DeusEx/Classes/BalancePlayer.uc @@ -764,7 +764,8 @@ state PlayerWalking newSpeed *= 0.65; GroundSpeed = FMax(newSpeed, 100); - if(Level.LevelAction != LEVACT_None) GroundSpeed = 0; + if(Level.LevelAction != LEVACT_None) GroundSpeed = 0;// DXRando: don't move during loading/randomization/autosave + else if(DeltaTime > 0.1) GroundSpeed /= 10 * DeltaTime;// DXRando: anyone running the game at 10fps? // if we are moving or crouching, we can't lean // uncomment below line to disallow leaning during crouch diff --git a/DXRModules/DeusEx/Classes/DXRAutosave.uc b/DXRModules/DeusEx/Classes/DXRAutosave.uc index 1f449ce0d..6f49cf72e 100644 --- a/DXRModules/DeusEx/Classes/DXRAutosave.uc +++ b/DXRModules/DeusEx/Classes/DXRAutosave.uc @@ -71,7 +71,7 @@ function NeedSave() } if(autosave_combat>0 || !PawnIsInCombat(player())) { autosave_combat = 1;// we're all in on this autosave because of the player rotation - Level.LevelAction = LEVACT_Saving;// save game cleans this up when it finishes + Level.LevelAction = LEVACT_Saving; if(!set_player_pos) { set_player_pos = true; class'DynamicTeleporter'.static.CheckTeleport(player(), coords_mult); @@ -115,7 +115,7 @@ function FixPlayer(optional bool pos) { local #var(PlayerPawn) p; - if(set_player_pos) { + /*if(set_player_pos) { p=player(); if(pos) { p.SetLocation(player_pos - vect(0,0,16));// a foot lower so you don't raise up @@ -124,7 +124,7 @@ function FixPlayer(optional bool pos) p.ViewRotation = player_rot; p.Velocity = vect(0,0,0); p.Acceleration = vect(0,0,0); - } + }*/ } function Tick(float delta) @@ -139,8 +139,10 @@ function Tick(float delta) } } else if(save_timer <= 0) { - if(Level.Game.GameSpeed == 1)// TODO: figure out what's wrong with using old_game_speed instead of 1 + if(Level.Game.GameSpeed == 1) {// TODO: figure out what's wrong with using old_game_speed instead of 1 Disable('Tick'); + Level.LevelAction = LEVACT_None; + } FixPlayer(Level.Game.GameSpeed == 1); SetGameSpeed(1); } else { @@ -227,6 +229,7 @@ function doAutosave() SetGameSpeed(1);// TODO: figure out what's wrong with using old_game_speed instead of 1 class'DXRStats'.static.IncDataStorageStat(p, "DXRStats_autosaves"); p.SaveGame(saveSlot, saveName); + Level.LevelAction = LEVACT_Saving; SetGameSpeed(0); if( interruptedDL != None ) {