From 4eec9dca63204133b2d3acf835bf8643e3c6cd5b Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Wed, 26 Aug 2020 10:08:50 +1000 Subject: [PATCH] - Duke/SW: Use `I_GetBuildTime()` instead of `gameclock` in game-side sound code. * Code is called where `gameclock` might not be set. --- source/games/duke/src/sounds.cpp | 2 +- source/sw/src/game.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/games/duke/src/sounds.cpp b/source/games/duke/src/sounds.cpp index 66e02cad2..6248974b1 100644 --- a/source/games/duke/src/sounds.cpp +++ b/source/games/duke/src/sounds.cpp @@ -353,7 +353,7 @@ void S_Update(void) } listener.ListenerObject = ud.camerasprite == -1 ? nullptr : &sprite[ud.camerasprite]; soundEngine->SetListener(listener); - soundEngine->UpdateSounds(gameclock); + soundEngine->UpdateSounds(I_GetBuildTime()); } diff --git a/source/sw/src/game.cpp b/source/sw/src/game.cpp index c88d33eaa..7c874035a 100644 --- a/source/sw/src/game.cpp +++ b/source/sw/src/game.cpp @@ -711,7 +711,7 @@ void EndOfLevel() COVER_SetReverb(0); // Reset reverb Player[myconnectindex].Reverb = 0; StopSound(); - soundEngine->UpdateSounds(gameclock); + soundEngine->UpdateSounds(I_GetBuildTime()); // NextLevel must be null while the intermission is running, but we still need the value for later auto localNextLevel = NextLevel; NextLevel = nullptr;