- 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.
This commit is contained in:
Christoph Oelckers 2022-07-14 08:13:54 +02:00
parent a952d0f36a
commit fbd604b725

View file

@ -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.