hedgewars/uSound.pas
changeset 7980 7f8df51553a7
parent 7896 67217e6108fd
child 7984 619a399bece8
equal deleted inserted replaced
7978:2ce76d1f594b 7980:7f8df51553a7
   268         if (voicepack^.chunks[snd] = nil) and (Soundz[snd].Path = ptVoices) and (Soundz[snd].FileName <> '') then
   268         if (voicepack^.chunks[snd] = nil) and (Soundz[snd].Path = ptVoices) and (Soundz[snd].FileName <> '') then
   269             begin
   269             begin
   270             s:= UserPathz[Soundz[snd].Path] + '/' + voicepack^.name + '/' + Soundz[snd].FileName;
   270             s:= UserPathz[Soundz[snd].Path] + '/' + voicepack^.name + '/' + Soundz[snd].FileName;
   271             if not FileExists(s) then
   271             if not FileExists(s) then
   272                 s:= Pathz[Soundz[snd].Path] + '/' + voicepack^.name + '/' + Soundz[snd].FileName;
   272                 s:= Pathz[Soundz[snd].Path] + '/' + voicepack^.name + '/' + Soundz[snd].FileName;
       
   273             if not FileExists(s) and (snd in [sndFirePunch2, sndFirePunch3, sndFirePunch4, sndFirePunch5, sndFirePunch6]) then
       
   274                 s:= Pathz[Soundz[sndFirePunch1].Path] + '/' + voicepack^.name + '/' + Soundz[snd].FileName;
   273             WriteToConsole(msgLoading + s + ' ');
   275             WriteToConsole(msgLoading + s + ' ');
   274             voicepack^.chunks[snd]:= Mix_LoadWAV_RW(SDL_RWFromFile(Str2PChar(s), _P'rb'), 1);
   276             voicepack^.chunks[snd]:= Mix_LoadWAV_RW(SDL_RWFromFile(Str2PChar(s), _P'rb'), 1);
   275             if voicepack^.chunks[snd] = nil then
   277             if voicepack^.chunks[snd] = nil then
   276                 WriteLnToConsole(msgFailed)
   278                 WriteLnToConsole(msgFailed)
   277             else
   279             else