--- a/hedgewars/uSound.pas Tue Dec 28 22:40:12 2010 +0100
+++ b/hedgewars/uSound.pas Thu Dec 30 19:36:40 2010 +0100
@@ -39,6 +39,7 @@
procedure PlayMusic;
procedure PauseMusic;
procedure ResumeMusic;
+procedure ChangeMusic;
procedure StopSound(snd: TSound);
procedure StopSound(chn: LongInt);
function ChangeVolume(voldelta: LongInt): LongInt;
@@ -318,6 +319,17 @@
Mix_ResumeMusic(Mus);
end;
+procedure ChangeMusic;
+begin
+ if (MusicFN = '') or (not isMusicEnabled) then
+ exit;
+
+ if Mus <> nil then
+ Mix_FreeMusic(Mus);
+
+ PlayMusic;
+end;
+
procedure chVoicepack(var s: shortstring);
begin
if CurrentTeam = nil then OutError(errmsgIncorrectUse + ' "/voicepack"', true);