- Exhumed: Avoid masking bits into the sector index as well.

# Conflicts:
#	source/games/exhumed/src/player.cpp
This commit is contained in:
Christoph Oelckers 2021-09-07 21:33:15 +02:00
parent 9991e6665c
commit d466ea155f
3 changed files with 5 additions and 5 deletions

View file

@ -1051,7 +1051,7 @@ void FuncPlayer(int a, int nDamage, int nRun)
sprite[nPlayerSprite].yvel = 0;
StopSpriteSound(nPlayerSprite);
PlayFXAtXYZ(StaticSound[kSoundJonFDie], sprite[nPlayerSprite].x, sprite[nPlayerSprite].y, sprite[nPlayerSprite].z, sprite[nPlayerSprite].sectnum |= 0x4000); // CHECKME
PlayFXAtXYZ(StaticSound[kSoundJonFDie], sprite[nPlayerSprite].x, sprite[nPlayerSprite].y, sprite[nPlayerSprite].z, sprite[nPlayerSprite].sectnum, CHANF_NONE, 1); // CHECKME
}
else
{

View file

@ -658,13 +658,13 @@ void PlayFX2(unsigned short nSound, short nSprite, int sectf, EChanFlags chanfla
//
//==========================================================================
void PlayFXAtXYZ(unsigned short ax, int x, int y, int z, int nSector, EChanFlags chanflags)
void PlayFXAtXYZ(unsigned short ax, int x, int y, int z, int nSector, EChanFlags chanflags, int sectf)
{
soundx = x;
soundy = y;
soundz = z;
soundsect = nSector&0x3fff;
PlayFX2(ax, -1, nSector & 0x4000, chanflags);
soundsect = nSector;
PlayFX2(ax, -1, sectf, chanflags);
}
//==========================================================================

View file

@ -132,7 +132,7 @@ void BendAmbientSound();
void CheckAmbience(short nSector);
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);
void PlayFXAtXYZ(unsigned short nSound, int x, int y, int z, int nSector, EChanFlags chanflags = CHANF_NONE, int sectf = 0);
inline void D3PlayFX(unsigned short nSound, short nVal, short flags = 0)
{
PlayFX2(nSound, nVal, 0, CHANF_NONE, flags);