From c341f38ba89c8cf2df2feb255fd666a7a7127af9 Mon Sep 17 00:00:00 2001 From: James R Date: Tue, 8 Aug 2023 17:32:39 -0700 Subject: [PATCH] srb2::music::TunesManager::resync: don't resync if server is not sending updates Prevents "CD skipping" jumpscare. --- src/music_manager.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/music_manager.cpp b/src/music_manager.cpp index 5d5edf058..05d02d855 100644 --- a/src/music_manager.cpp +++ b/src/music_manager.cpp @@ -20,6 +20,7 @@ #include "music_manager.hpp" #include "music_tune.hpp" +#include "d_clisrv.h" #include "doomtype.h" #include "i_sound.h" #include "i_time.h" @@ -173,6 +174,13 @@ bool TuneManager::resync() return false; } + if (hu_stopped) + { + // The server is not sending updates. Don't resync + // because we know game logic is not moving anyway. + return false; + } + long d_local = I_GetTime() - time_local_; long d_sync = detail::tic_time() - time_sync_;