mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-29 19:36:43 +00:00
Avoid a hack to play the underwater sound properly
This commit is contained in:
parent
e5ce94c336
commit
16331bf1ed
2 changed files with 4 additions and 4 deletions
|
@ -39,9 +39,11 @@ namespace MWBase
|
||||||
Play_Normal = 0, /* tracked, non-looping, multi-instance, environment */
|
Play_Normal = 0, /* tracked, non-looping, multi-instance, environment */
|
||||||
Play_Loop = 1<<0, /* Sound will continually loop until explicitly stopped */
|
Play_Loop = 1<<0, /* Sound will continually loop until explicitly stopped */
|
||||||
Play_NoEnv = 1<<1, /* Do not apply environment effects (eg, underwater filters) */
|
Play_NoEnv = 1<<1, /* Do not apply environment effects (eg, underwater filters) */
|
||||||
Play_NoTrack = 1<<2 /* (3D only) Play the sound at the given object's position
|
Play_NoTrack = 1<<2, /* (3D only) Play the sound at the given object's position
|
||||||
* but do not keep it updated (the sound will not move with
|
* but do not keep it updated (the sound will not move with
|
||||||
* the object and will not stop when the object is deleted. */
|
* the object and will not stop when the object is deleted. */
|
||||||
|
|
||||||
|
Play_LoopNoEnv = Play_Loop | Play_NoEnv
|
||||||
};
|
};
|
||||||
enum PlayType {
|
enum PlayType {
|
||||||
Play_TypeSfx = 1<<3, /* Normal SFX sound */
|
Play_TypeSfx = 1<<3, /* Normal SFX sound */
|
||||||
|
|
|
@ -550,10 +550,8 @@ namespace MWSound
|
||||||
{
|
{
|
||||||
env = Env_Underwater;
|
env = Env_Underwater;
|
||||||
//play underwater sound
|
//play underwater sound
|
||||||
//HACK: this sound is always played underwater, so set volume and pitch higher (it's then lowered)
|
|
||||||
//Currently not possible to play looping sound with no environment
|
|
||||||
if(!getSoundPlaying(MWWorld::Ptr(), "Underwater"))
|
if(!getSoundPlaying(MWWorld::Ptr(), "Underwater"))
|
||||||
playSound("Underwater", 1.11, 1.42 ,Play_TypeSfx, Play_Loop );
|
playSound("Underwater", 1.0f, 1.0f, Play_TypeSfx, Play_LoopNoEnv);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue