diff --git a/Utils/Sound Control.cpp b/Utils/Sound Control.cpp index 2598dc28..f51b6347 100644 --- a/Utils/Sound Control.cpp +++ b/Utils/Sound Control.cpp @@ -575,16 +575,15 @@ UINT32 PlayJA2AmbientRandom( UINT32 usNum, UINT32 uiTimeMin, UINT32 uiTimeMax) -UINT32 PlaySoldierJA2Sample( UINT16 usID, UINT32 usNum, UINT32 usRate, UINT32 ubVolume, UINT32 ubLoops, UINT32 uiPan, BOOLEAN fCheck ) +UINT32 PlaySoldierJA2Sample( SoldierID usID, UINT32 usNum, UINT32 usRate, UINT32 ubVolume, UINT32 ubLoops, UINT32 uiPan, BOOLEAN fCheck ) { - if( !( gTacticalStatus.uiFlags & LOADING_SAVED_GAME ) ) { - // CHECK IF GUY IS ON SCREEN BEFORE PLAYING! - if ( ( MercPtrs[ usID ]->bVisible != -1 ) || !fCheck ) - { - return( PlayJA2Sample( usNum, usRate, CalculateSoundEffectsVolume( ubVolume ), ubLoops, uiPan ) ); - } + // CHECK IF GUY IS ON SCREEN BEFORE PLAYING! + if ( ( usID->bVisible != -1 ) || !fCheck ) + { + return( PlayJA2Sample( usNum, usRate, CalculateSoundEffectsVolume( ubVolume ), ubLoops, uiPan ) ); + } } return( 0 ); diff --git a/Utils/Sound Control.h b/Utils/Sound Control.h index 51a31a9b..64efce99 100644 --- a/Utils/Sound Control.h +++ b/Utils/Sound Control.h @@ -5,6 +5,8 @@ #ifndef SOUND_CONTROL_H #define SOUND_CONTROL_H +#include "Overhead Types.h" + // == Lesh modifications ====== #define FARLEFT 0 #define LEFTSIDE 96 @@ -423,7 +425,7 @@ UINT32 PlayJA2StreamingSampleFromFile( STR8 szFileName, UINT32 usRate, UINT32 ub UINT32 PlayJA2Ambient( UINT32 usNum, UINT32 ubVolume, UINT32 ubLoops); UINT32 PlayJA2AmbientRandom(UINT32 usNum, UINT32 uiTimeMin, UINT32 uiTimeMax); -UINT32 PlaySoldierJA2Sample( UINT16 usID, UINT32 usNum, UINT32 usRate, UINT32 ubVolume, UINT32 ubLoops, UINT32 uiPan, BOOLEAN fCheck ); +UINT32 PlaySoldierJA2Sample( SoldierID usID, UINT32 usNum, UINT32 usRate, UINT32 ubVolume, UINT32 ubLoops, UINT32 uiPan, BOOLEAN fCheck ); @@ -465,4 +467,4 @@ void SetPositionSndGridNo( INT32 iPositionSndIndex, INT32 sGridNo ); -#endif \ No newline at end of file +#endif