# HG changeset patch
# User unc0rr
# Date 1231797767 0
# Node ID dde8f60d3e07c9891ab5cd337509fdc38e2eb988
# Parent  209cf0e2fc36c41bae3a6a5ab92a962db26a93a6
Fix small bug in voicepacks support in engine. It's complete and tested now.

diff -r 209cf0e2fc36 -r dde8f60d3e07 hedgewars/uSound.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);
diff -r 209cf0e2fc36 -r dde8f60d3e07 hedgewars/uTeams.pas
--- 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