--- a/hedgewars/uSound.pas Sun Jun 01 16:13:47 2014 -0400
+++ b/hedgewars/uSound.pas Tue Jun 03 11:09:18 2014 -0400
@@ -104,6 +104,8 @@
// Returns a pointer to the voicepack with the given name.
function AskForVoicepack(name: shortstring): Pointer;
+var MusicFN: shortstring; // music file name
+ SDMusicFN: shortstring; // SD music file name
var Volume: LongInt;
SoundTimerTicks: Longword;
@@ -117,7 +119,6 @@
voicepacks: array[0..cMaxTeams] of TVoicepack;
defVoicepack: PVoicepack;
Mus: PMixMusic; // music pointer
- MusicFN: shortstring; // music file name
isMusicEnabled: boolean;
isSoundEnabled: boolean;
isSEBackup: boolean;
@@ -554,8 +555,9 @@
begin
if (MusicFN = '') or (not isMusicEnabled) then
exit;
-
- s:= '/Music/' + MusicFN;
+ if SuddenDeath and (SDMusicFN <> '') then
+ s:= '/Music/' + SDMusicFN
+ else s:= '/Music/' + MusicFN;
WriteToConsole(msgLoading + s + ' ');
Mus:= Mix_LoadMUS_RW(rwopsOpenRead(s));