Skip to content

Commit

Permalink
- Exhumed: Avoid masking bits into the sector index as well.
Browse files Browse the repository at this point in the history
# Conflicts:
#	source/games/exhumed/src/player.cpp
  • Loading branch information
coelckers committed Sep 12, 2021
1 parent 9991e66 commit d466ea1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion source/games/exhumed/src/player.cpp
Expand Up @@ -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
{
Expand Down
6 changes: 3 additions & 3 deletions source/games/exhumed/src/sound.cpp
Expand Up @@ -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);
}

//==========================================================================
Expand Down
2 changes: 1 addition & 1 deletion source/games/exhumed/src/sound.h
Expand Up @@ -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);
Expand Down

0 comments on commit d466ea1

Please sign in to comment.