Fix small bug in voicepacks support in engine. It's complete and tested now.
authorunc0rr
Mon, 12 Jan 2009 22:02:47 +0000
changeset 1657 dde8f60d3e07
parent 1656 209cf0e2fc36
child 1658 208a3258afdf
Fix small bug in voicepacks support in engine. It's complete and tested now.
hedgewars/uSound.pas
hedgewars/uTeams.pas
--- a/hedgewars/uSound.pas	Mon Jan 12 21:57:41 2009 +0000
+++ b/hedgewars/uSound.pas	Mon Jan 12 22:02:47 2009 +0000
@@ -114,7 +114,7 @@
 for i:= Low(TSound) to High(TSound) do
 	if Soundz[i].Path <> ptVoices then
 		begin
-		s:= Pathz[Soundz[i].Path] + '/Default/' + Soundz[i].FileName;
+		s:= Pathz[Soundz[i].Path] + '/' + Soundz[i].FileName;
 		WriteToConsole(msgLoading + s + ' ');
 		defVoicepack^.chunks[i]:= Mix_LoadWAV_RW(SDL_RWFromFile(Str2PChar(s), 'rb'), 1);
 		TryDo(defVoicepack^.chunks[i] <> nil, msgFailed, true);
--- a/hedgewars/uTeams.pas	Mon Jan 12 21:57:41 2009 +0000
+++ b/hedgewars/uTeams.pas	Mon Jan 12 22:02:47 2009 +0000
@@ -224,6 +224,8 @@
 
 if not CurrentTeam^.ExtDriven then SetBinds(CurrentTeam^.Binds);
 
+SetVoicePack(CurrentTeam^.voicepack);
+
 bShowFinger:= true;
 
 if (CurrentTeam^.ExtDriven or (CurrentHedgehog^.BotLevel > 0)) then