mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-29 17:06:43 +00:00
Play player voices locally
This commit is contained in:
parent
449eca4fb4
commit
4a078725d4
1 changed files with 10 additions and 4 deletions
|
@ -392,10 +392,16 @@ namespace MWSound
|
||||||
mVFS->normalizeFilename(voicefile);
|
mVFS->normalizeFilename(voicefile);
|
||||||
DecoderPtr decoder = loadVoice(voicefile, &loudness);
|
DecoderPtr decoder = loadVoice(voicefile, &loudness);
|
||||||
|
|
||||||
MWBase::SoundPtr sound = mOutput->streamSound3D(decoder,
|
MWBase::SoundPtr sound;
|
||||||
objpos, 1.0f, basevol, 1.0f, minDistance, maxDistance,
|
if(ptr == MWMechanics::getPlayer())
|
||||||
Play_Normal|Play_TypeVoice|Play_3D
|
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);
|
mActiveSaySounds[ptr] = std::make_pair(sound, loudness);
|
||||||
}
|
}
|
||||||
catch(std::exception &e)
|
catch(std::exception &e)
|
||||||
|
|
Loading…
Reference in a new issue