diff --git a/source/games/exhumed/src/player.cpp b/source/games/exhumed/src/player.cpp index e1f2b5518..95c4a98c1 100644 --- a/source/games/exhumed/src/player.cpp +++ b/source/games/exhumed/src/player.cpp @@ -1101,7 +1101,7 @@ void FuncPlayer(int a, int nDamage, int nRun) short nBlock = sector[nPlayerPushSect[nPlayer]].extra; int nBlockSprite = sBlockInfo[nBlock].nSprite; - D3PlayFX(StaticSound[kSound23], nBlockSprite | 0x4000); + D3PlayFX(StaticSound[kSound23], nBlockSprite, 0x4000); } else { diff --git a/source/games/exhumed/src/runlist.cpp b/source/games/exhumed/src/runlist.cpp index e4998b7a8..1be9eabab 100644 --- a/source/games/exhumed/src/runlist.cpp +++ b/source/games/exhumed/src/runlist.cpp @@ -1681,7 +1681,7 @@ void runlist_DamageEnemy(int nSprite, int nSprite2, short nDamage) } int nDopSprite = nDoppleSprite[nPlayer]; - D3PlayFX(StaticSound[kSoundTauntStart + (RandomSize(3) % 5)], nDopSprite | ebx); + D3PlayFX(StaticSound[kSoundTauntStart + (RandomSize(3) % 5)], nDopSprite, ebx); } nTauntTimer[nPlayer] = RandomSize(3) + 3; diff --git a/source/games/exhumed/src/sound.cpp b/source/games/exhumed/src/sound.cpp index 3cf70cab7..3dcac8ac4 100644 --- a/source/games/exhumed/src/sound.cpp +++ b/source/games/exhumed/src/sound.cpp @@ -557,7 +557,7 @@ void GameInterface::UpdateSounds() int soundx, soundy, soundz; short soundsect; -void PlayFX2(unsigned short nSound, short nSprite, int sectf, EChanFlags chanflags) +void PlayFX2(unsigned short nSound, short nSprite, int sectf, EChanFlags chanflags, int sprflags) { if (!SoundEnabled()) return; if ((nSound&0x1ff) >= kMaxSounds || !soundEngine->isValidSoundId((nSound & 0x1ff)+1)) @@ -569,9 +569,8 @@ void PlayFX2(unsigned short nSound, short nSprite, int sectf, EChanFlags chanfla bool fullvol = false, hiprio = false; if (nSprite >= 0) { - fullvol = (nSprite & 0x2000) != 0; - hiprio = (nSprite & 0x4000) != 0; - nSprite &= 0xfff; + fullvol = (sprflags & 0x2000) != 0; + hiprio = (sprflags & 0x4000) != 0; soundx = sprite[nSprite].x; soundy = sprite[nSprite].y; soundz = sprite[nSprite].z; diff --git a/source/games/exhumed/src/sound.h b/source/games/exhumed/src/sound.h index 175728a43..4fdf25866 100644 --- a/source/games/exhumed/src/sound.h +++ b/source/games/exhumed/src/sound.h @@ -131,11 +131,11 @@ int LoadSound(const char* sound); void BendAmbientSound(); void CheckAmbience(short nSector); -void PlayFX2(unsigned short nSound, short nSprite, int sectf = 0, EChanFlags chanflags = CHANF_NONE); +void PlayFX2(unsigned short nSound, short nSprite, int sectf = 0, EChanFlags chanflags = CHANF_NONE, int sprflags = 0); void PlayFXAtXYZ(unsigned short nSound, int x, int y, int z, int nSector, EChanFlags chanflags = CHANF_NONE); -inline void D3PlayFX(unsigned short nSound, short nVal) +inline void D3PlayFX(unsigned short nSound, short nVal, short flags = 0) { - PlayFX2(nSound, nVal); + PlayFX2(nSound, nVal, 0, CHANF_NONE, flags); } void StopSpriteSound(short nSprite);