ProcessNoise: fixed incorrect noise terrain check.

Reverted r9259.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9274 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Sevenfm
2022-01-25 04:15:39 +00:00
parent f8be9a0db1
commit e887f85a44
2 changed files with 5 additions and 24 deletions
+4 -14
View File
@@ -51,7 +51,6 @@
#endif
BOOLEAN gfSetPerceivedDoorState = FALSE;
extern BOOLEAN gfPlayerMercHeardNoise;
BOOLEAN HandleDoorsOpenClose( SOLDIERTYPE *pSoldier, INT32 sGridNo, STRUCTURE * pStructure, BOOLEAN fNoAnimations );
@@ -1161,9 +1160,6 @@ BOOLEAN HandleDoorsOpenClose( SOLDIERTYPE *pSoldier, INT32 sGridNo, STRUCTURE *
cnt++;
};
// sevenfm: reset code to detect heard noise
gfPlayerMercHeardNoise = FALSE;
if (pSoldier && pSoldier->ubDoorOpeningNoise > 0)
{
//shadooow: noise handling moved here so we can work with modified value of pSoldier->ubDoorOpeningNoise
@@ -1284,11 +1280,8 @@ BOOLEAN HandleDoorsOpenClose( SOLDIERTYPE *pSoldier, INT32 sGridNo, STRUCTURE *
uiSoundID = METAL_DOOR_OPEN;
}
if (pSoldier && pSoldier->bVisible == TRUE || gfPlayerMercHeardNoise)
{
// OK, We must know what sound to play, for now use same sound for all doors...
PlayJA2Sample(uiSoundID, RATE_11025, SoundVolume(MIDVOLUME, sGridNo), 1, SoundDir(sGridNo));
}
// OK, We must know what sound to play, for now use same sound for all doors...
PlayJA2Sample(uiSoundID, RATE_11025, SoundVolume(MIDVOLUME, sGridNo), 1, SoundDir(sGridNo));
}
if (((gWorldSectorX == gModSettings.ubInitialPOWSectorX && gWorldSectorY == gModSettings.ubInitialPOWSectorY) ||
@@ -1414,11 +1407,8 @@ BOOLEAN HandleDoorsOpenClose( SOLDIERTYPE *pSoldier, INT32 sGridNo, STRUCTURE *
uiSoundID = METAL_DOOR_CLOSE;
}
if (pSoldier && pSoldier->bVisible == TRUE || gfPlayerMercHeardNoise)
{
// OK, We must know what sound to play, for now use same sound for all doors...
PlayJA2Sample(uiSoundID, RATE_11025, SoundVolume(MIDVOLUME, sGridNo), 1, SoundDir(sGridNo));
}
// OK, We must know what sound to play, for now use same sound for all doors...
PlayJA2Sample(uiSoundID, RATE_11025, SoundVolume(MIDVOLUME, sGridNo), 1, SoundDir(sGridNo));
}
}