- call the proper functions to stop sounds in Shadow Warrior.

This commit is contained in:
Christoph Oelckers 2020-02-23 17:13:18 +01:00
parent c8aa006f82
commit 83adb81756
2 changed files with 4 additions and 4 deletions

View file

@ -699,7 +699,7 @@ extern SWBOOL InMenuLevel;
PauseAction();
TerminateLevel();
}
Terminate3DSounds();
StopFX();
return true;
}
@ -726,7 +726,6 @@ bool GameInterface::LoadGame(FSaveGameNode* sv)
int StateNdx;
int StateEndNdx;
StopFX();
Saveable_Init();
auto filr = ReadSavegameChunk("snapshot.sw");

View file

@ -52,6 +52,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "z_music.h"
#include "sound/s_soundinternal.h"
#include "filesystem/filesystem.h"
#include "serializer.h"
BEGIN_SW_NS
@ -216,7 +217,6 @@ struct AmbientSound
static TArray<AmbientSound*> ambients;
//==========================================================================
//
//
@ -228,6 +228,7 @@ void StopAmbientSound(void)
for (auto amb : ambients)
{
soundEngine->StopSound(SOURCE_Ambient, amb, -1);
delete amb;
}
ambients.Clear();
}
@ -267,7 +268,7 @@ void InitAmbient(int num, SPRITEp sp)
amb->sp = sp;
amb->ambIndex = num;
amb->vocIndex = vnum;
amb->ChanFlags = 0;
amb->ChanFlags = CHANF_TRANSIENT;
if (ambarray[num].ambient_flags & v3df_dontpan) amb->ChanFlags |= EChanFlags::FromInt(CHANEXF_DONTPAN);
if (voc[vnum].voc_flags & vf_loop) amb->ChanFlags |= CHANF_LOOP;
amb->maxIndex = ambarray[num].maxtics * 8;