- 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)
--- 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);
}
--- 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++)
--- 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++)
{
--- 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.