Play different sound when object drops into water, depending on object weight and type.

Play S_WATER_IMPACT1 when bullet hits water.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9294 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Sevenfm
2022-02-08 10:17:38 +00:00
parent 44e4f96c0f
commit 1015614473
4 changed files with 75 additions and 32 deletions
+7 -10
View File
@@ -5872,14 +5872,13 @@ void StructureHit( INT32 iBullet, UINT16 usWeaponIndex, INT16 bWeaponStatus, UIN
}
else
{
if ( sZPos == 0 )
{
if (Water(sGridNo, bLevel))
PlayJA2Sample(S_WATER_IMPACT1, RATE_11025, uiMissVolume, 1, SoundDir(sGridNo));
else if ( sZPos == 0 )
PlayJA2Sample( MISS_G2 , RATE_11025, 5, 1, SoundDir( sGridNo ) );
}
else
{
PlayJA2Sample( MISS_1 + Random(8), RATE_11025, 5, 1, SoundDir( sGridNo ) );
}
RemoveBullet( iBullet );
}
@@ -5915,14 +5914,12 @@ void StructureHit( INT32 iBullet, UINT16 usWeaponIndex, INT16 bWeaponStatus, UIN
if ( !fStopped || !DoSpecialEffectAmmoMiss( ubAttackerID, usWeaponIndex, sGridNo, sXPos, sYPos, sZPos, FALSE, TRUE, iBullet ) )
{
if ( sZPos == 0 )
{
if (Water(sGridNo, bLevel))
PlayJA2Sample(S_WATER_IMPACT1, RATE_11025, uiMissVolume, 1, SoundDir(sGridNo));
else if ( sZPos == 0 )
PlayJA2Sample( MISS_G2 , RATE_11025, uiMissVolume, 1, SoundDir( sGridNo ) );
}
else
{
PlayJA2Sample( MISS_1 + Random(8), RATE_11025, uiMissVolume, 1, SoundDir( sGridNo ) );
}
// Default hit is the ground
usMissTileIndex = FIRSTMISS1;