Avoid a hack to play the underwater sound properly

actorid
Chris Robinson 12 years ago
parent e5ce94c336
commit 16331bf1ed

@ -39,9 +39,11 @@ namespace MWBase
Play_Normal = 0, /* tracked, non-looping, multi-instance, environment */
Play_Loop = 1<<0, /* Sound will continually loop until explicitly stopped */
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
* the object and will not stop when the object is deleted. */
Play_LoopNoEnv = Play_Loop | Play_NoEnv
};
enum PlayType {
Play_TypeSfx = 1<<3, /* Normal SFX sound */

@ -550,10 +550,8 @@ namespace MWSound
{
env = Env_Underwater;
//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"))
playSound("Underwater", 1.11, 1.42 ,Play_TypeSfx, Play_Loop );
playSound("Underwater", 1.0f, 1.0f, Play_TypeSfx, Play_LoopNoEnv);
}
else
{

Loading…
Cancel
Save