From 4a078725d4a669bfa1863e50547ed9025f3c532d Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 27 Nov 2015 02:57:44 -0800 Subject: [PATCH] Play player voices locally --- apps/openmw/mwsound/soundmanagerimp.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/apps/openmw/mwsound/soundmanagerimp.cpp b/apps/openmw/mwsound/soundmanagerimp.cpp index 7e1244feb..d08aa4ca0 100644 --- a/apps/openmw/mwsound/soundmanagerimp.cpp +++ b/apps/openmw/mwsound/soundmanagerimp.cpp @@ -392,10 +392,16 @@ namespace MWSound mVFS->normalizeFilename(voicefile); DecoderPtr decoder = loadVoice(voicefile, &loudness); - MWBase::SoundPtr sound = mOutput->streamSound3D(decoder, - objpos, 1.0f, basevol, 1.0f, minDistance, maxDistance, - Play_Normal|Play_TypeVoice|Play_3D - ); + MWBase::SoundPtr sound; + if(ptr == MWMechanics::getPlayer()) + sound = mOutput->streamSound(decoder, + basevol, 1.0f, Play_Normal|Play_TypeVoice|Play_2D + ); + else + sound = mOutput->streamSound3D(decoder, + objpos, 1.0f, basevol, 1.0f, minDistance, maxDistance, + Play_Normal|Play_TypeVoice|Play_3D + ); mActiveSaySounds[ptr] = std::make_pair(sound, loudness); } catch(std::exception &e)