From e84edc47d141c2193a362776bb76cedeb385b51f Mon Sep 17 00:00:00 2001 From: MaddMugsy Date: Fri, 8 Jun 2012 19:56:14 +0000 Subject: [PATCH] 1. Added zombie battle sounds 2. Made creepy music play when zombies rise git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5335 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/Rotting Corpses.cpp | 5 ++++- Tactical/Soldier Control.cpp | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/Tactical/Rotting Corpses.cpp b/Tactical/Rotting Corpses.cpp index 002947f6..1b18818e 100644 --- a/Tactical/Rotting Corpses.cpp +++ b/Tactical/Rotting Corpses.cpp @@ -43,7 +43,7 @@ #include "strategic.h" #include "qarray.h" #include "Interface.h" - + #include "Music Control.h" #include "Campaign Types.h" //#include "Queen Command.h" #include "text.h" // added by Flugente @@ -2148,6 +2148,9 @@ void RaiseZombies( void ) #endif // Play sound PlayJA2SampleFromFile( "Sounds\\zombie1.wav", RATE_11025, HIGHVOLUME, 1, MIDDLEPAN ); + + UseCreatureMusic(TRUE); // Madd: music when zombies rise + SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT ); } } } diff --git a/Tactical/Soldier Control.cpp b/Tactical/Soldier Control.cpp index 88956030..a84efacd 100644 --- a/Tactical/Soldier Control.cpp +++ b/Tactical/Soldier Control.cpp @@ -9988,6 +9988,25 @@ BOOLEAN SOLDIERTYPE::InternalDoMercBattleSound( UINT8 ubBattleSoundID, INT8 bSpe } } } + else if ( pSoldier->IsZombie() ) // Madd: add zombie sounds + { + if ( ubSoundID == BATTLE_SOUND_DIE1 ) + { + sprintf( zFilename, "BATTLESNDS\\zombie_die.ogg" ); + if ( !FileExists( zFilename ) ) + { + sprintf( zFilename, "BATTLESNDS\\zombie_die.wav" ); + } + } + else + { + sprintf( zFilename, "BATTLESNDS\\zombie_%s.ogg", gBattleSndsData[ ubSoundID ].zName ); + if ( !FileExists( zFilename ) ) + { + sprintf( zFilename, "BATTLESNDS\\zombie_%s.wav", gBattleSndsData[ ubSoundID ].zName ); + } + } + } else { if ( ubSoundID == BATTLE_SOUND_DIE1 )