From e9b3e8ae09df349549d43d048b2835321f234f8d Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 29 Jul 2020 22:26:14 +0200 Subject: [PATCH] - when in single player, always play talk sounds from the player actor. It seems some places manage to play these sounds from undefined actors that may or may not be in range. Fixes #75 --- source/games/duke/src/sounds.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/games/duke/src/sounds.cpp b/source/games/duke/src/sounds.cpp index eae187a3e..e0606f623 100644 --- a/source/games/duke/src/sounds.cpp +++ b/source/games/duke/src/sounds.cpp @@ -388,6 +388,14 @@ int S_PlaySound3D(int sndnum, int spriteNum, const vec3_t* pos, int channel, ECh }); // don't play if any Duke talk sounds are already playing if (foundone) return -1; + + // When in single player, force all talk sounds to originate from the player actor, no matter what is being used to start them. + // Fixes a problem with quake06.voc in E3L4. + if (ud.multimode == 1) + { + spriteNum = pl->i; + auto sp = &sprite[spriteNum]; + } } int32_t sndist;