# HG changeset patch # User unc0rr # Date 1245872852 0 # Node ID 4763a778c033a1b4f0f58140e9ad5df68a9bf81c # Parent 20c62f787a4d34be0e5237c0176bfa500db0e01d - Fix quickplay sound bug triggered by two faults: ttsmj's (passing voicepack with empty name in team config) and koda's (he changed fallback to default scheme condition) - Fix openal's warning (trying to fadeout not loaded music) diff -r 20c62f787a4d -r 4763a778c033 QTfrontend/SDLs.cpp --- a/QTfrontend/SDLs.cpp Wed Jun 24 15:59:32 2009 +0000 +++ b/QTfrontend/SDLs.cpp Wed Jun 24 19:47:32 2009 +0000 @@ -69,5 +69,5 @@ void SDLInteraction::StopMusic() { - openal_fadeout(music, 50); + if (music >= 0) openal_fadeout(music, 50); } diff -r 20c62f787a4d -r 4763a778c033 QTfrontend/namegen.cpp --- a/QTfrontend/namegen.cpp Wed Jun 24 15:59:32 2009 +0000 +++ b/QTfrontend/namegen.cpp Wed Jun 24 19:47:32 2009 +0000 @@ -56,6 +56,7 @@ } team->Grave = "Simple"; // Todo: make it semi-random team->Fort = "Island"; // Todo: make it semi-random + team->Voicepack = "Default"; } for(int i = 0; i < 8; i++) diff -r 20c62f787a4d -r 4763a778c033 QTfrontend/team.cpp --- a/QTfrontend/team.cpp Wed Jun 24 15:59:32 2009 +0000 +++ b/QTfrontend/team.cpp Wed Jun 24 19:47:32 2009 +0000 @@ -82,6 +82,7 @@ Grave = QString("Simple"); // default Fort = QString("Island"); // default + Voicepack = "Default"; for(int i = 0; i < BINDS_NUMBER; i++) { diff -r 20c62f787a4d -r 4763a778c033 hedgewars/uSound.pas --- a/hedgewars/uSound.pas Wed Jun 24 15:59:32 2009 +0000 +++ b/hedgewars/uSound.pas Wed Jun 24 19:47:32 2009 +0000 @@ -89,6 +89,7 @@ end; voicepacks[i].name:= name; +addfilelog('================================================ '+inttostr(i)); AskForVoicepack:= @voicepacks[i] end; @@ -157,7 +158,6 @@ if infinite then openal_toggleloop(defVoicepack^.chunks[snd]); openal_playsound(defVoicepack^.chunks[snd]); lastChan[snd]:=defVoicepack^.chunks[snd]; - end end; @@ -203,4 +203,14 @@ openal_playsound(Mus); end; + +var i: LongInt; + c: TSound; + +initialization +for i:= 0 to cMaxTeams do + for c:= Low(TSound) to High(TSound) do + voicepacks[i].chunks[c]:= -1 + + end.