From fbd604b72569e56c67dd8512e6eec10ce07644b0 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 14 Jul 2022 08:13:54 +0200 Subject: [PATCH] - fixed handling of *dive and *surface sounds. The old water level needs to be retrieved before handling splashes, because SplashCheck already updates the waterlevel. This was swapped around by a recent PR. --- src/playsim/p_mobj.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/playsim/p_mobj.cpp b/src/playsim/p_mobj.cpp index bb2f6042da..f9e306dc3b 100644 --- a/src/playsim/p_mobj.cpp +++ b/src/playsim/p_mobj.cpp @@ -4388,9 +4388,9 @@ void AActor::SplashCheck() bool AActor::UpdateWaterLevel(bool dosplash) { - if (dosplash) SplashCheck(); - int oldlevel = waterlevel; + + if (dosplash) SplashCheck(); UpdateWaterDepth(false); // Play surfacing and diving sounds, as appropriate.