Added Battlesounds for melee attacks.

For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=358569&#msg_358569

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8708 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2019-11-27 21:46:49 +00:00
parent 32cdfc18cd
commit c8207018e3
3 changed files with 14 additions and 0 deletions
+10
View File
@@ -2931,6 +2931,16 @@ BOOLEAN AdjustToNextAnimationFrame( SOLDIERTYPE *pSoldier )
{
PlaySoldierJA2Sample( pSoldier->ubID, (UINT8)( SWOOSH_1 + Random( 6 ) ), RATE_11025, SoundVolume( HIGHVOLUME, pSoldier->sGridNo ), 1, SoundDir( pSoldier->sGridNo ), TRUE );
}
// Flugente: play a little sound for melee attacks
if ( !usedWeapon || Item[usedWeapon].usItemClass & IC_PUNCH )
{
pSoldier->DoMercBattleSound( BATTLE_SOUND_PUNCH );
}
else if ( Item[usedWeapon].usItemClass & (IC_BLADE | IC_THROWING_KNIFE) )
{
pSoldier->DoMercBattleSound( BATTLE_SOUND_KNIFE );
}
}
break;
+2
View File
@@ -261,6 +261,8 @@ BATTLESNDS_STRUCT gBattleSndsData[] =
"lmattn", 1, 0, 1, 0,
"locked", 0, 0, 1, 0,
"enem", 1, 1, 1, 0,
"punch", 1, 0, 0, 0,
"knife", 1, 0, 0, 0,
};
extern void ReduceAttachmentsOnGunForNonPlayerChars( SOLDIERTYPE *pSoldier, OBJECTTYPE * pObj );
+2
View File
@@ -260,6 +260,8 @@ enum
BATTLE_SOUND_LOWMARALE_ATTN1,
BATTLE_SOUND_LOCKED,
BATTLE_SOUND_ENEMY,
BATTLE_SOUND_PUNCH, // Flugente: attacking with punch attack
BATTLE_SOUND_KNIFE, // Flugente: attacking with knife attack
NUM_MERC_BATTLE_SOUNDS
};