diff -r 7de85783b823 -r 4a4f21070479 hedgewars/uSound.pas --- a/hedgewars/uSound.pas Sun Nov 11 16:53:16 2012 +0100 +++ b/hedgewars/uSound.pas Sun Nov 11 17:15:19 2012 +0100 @@ -170,7 +170,7 @@ procedure InitSound; const channels: LongInt = {$IFDEF MOBILE}1{$ELSE}2{$ENDIF}; begin - if (not isSoundEnabled) then + if not isSoundEnabled then exit; WriteToConsole('Init sound...'); isSoundEnabled:= SDL_InitSubSystem(SDL_INIT_AUDIO) >= 0; @@ -268,7 +268,7 @@ if (voicepack^.chunks[snd] = nil) and (Soundz[snd].Path = ptVoices) and (Soundz[snd].FileName <> '') then begin s:= UserPathz[Soundz[snd].Path] + '/' + voicepack^.name + '/' + Soundz[snd].FileName; - if (not FileExists(s)) then + if not FileExists(s) then s:= Pathz[Soundz[snd].Path] + '/' + voicepack^.name + '/' + Soundz[snd].FileName; if (not FileExists(s)) and (snd in [sndFirePunch2, sndFirePunch3, sndFirePunch4, sndFirePunch5, sndFirePunch6]) then s:= Pathz[Soundz[sndFirePunch1].Path] + '/' + voicepack^.name + '/' + Soundz[snd].FileName; @@ -286,7 +286,7 @@ if (defVoicepack^.chunks[snd] = nil) and (Soundz[snd].Path <> ptVoices) and (Soundz[snd].FileName <> '') then begin s:= UserPathz[Soundz[snd].Path] + '/' + Soundz[snd].FileName; - if (not FileExists(s)) then + if not FileExists(s) then s:= Pathz[Soundz[snd].Path] + '/' + Soundz[snd].FileName; WriteToConsole(msgLoading + s + ' '); defVoicepack^.chunks[snd]:= Mix_LoadWAV_RW(SDL_RWFromFile(Str2PChar(s), _P'rb'), 1); @@ -370,7 +370,7 @@ if (voicepack^.chunks[snd] = nil) and (Soundz[snd].Path = ptVoices) and (Soundz[snd].FileName <> '') then begin s:= UserPathz[Soundz[snd].Path] + '/' + voicepack^.name + '/' + Soundz[snd].FileName; - if (not FileExists(s)) then + if not FileExists(s) then s:= Pathz[Soundz[snd].Path] + '/' + voicepack^.name + '/' + Soundz[snd].FileName; WriteToConsole(msgLoading + s + ' '); voicepack^.chunks[snd]:= Mix_LoadWAV_RW(SDL_RWFromFile(Str2PChar(s), _P'rb'), 1); @@ -386,7 +386,7 @@ if (defVoicepack^.chunks[snd] = nil) and (Soundz[snd].Path <> ptVoices) and (Soundz[snd].FileName <> '') then begin s:= UserPathz[Soundz[snd].Path] + '/' + Soundz[snd].FileName; - if (not FileExists(s)) then + if not FileExists(s) then s:= Pathz[Soundz[snd].Path] + '/' + Soundz[snd].FileName; WriteToConsole(msgLoading + s + ' '); defVoicepack^.chunks[snd]:= Mix_LoadWAV_RW(SDL_RWFromFile(Str2PChar(s), _P'rb'), 1); @@ -402,7 +402,7 @@ procedure StopSound(snd: TSound); begin - if (not isSoundEnabled) then + if not isSoundEnabled then exit; if (lastChan[snd] <> -1) and (Mix_Playing(lastChan[snd]) <> 0) then @@ -414,7 +414,7 @@ procedure StopSoundChan(chn: LongInt); begin - if (not isSoundEnabled) then + if not isSoundEnabled then exit; if (chn <> -1) and (Mix_Playing(chn) <> 0) then @@ -423,7 +423,7 @@ procedure StopSoundChan(chn, fadems: LongInt); begin - if (not isSoundEnabled) then + if not isSoundEnabled then exit; if (chn <> -1) and (Mix_Playing(chn) <> 0) then @@ -437,7 +437,7 @@ exit; s:= UserPathPrefix + '/Data/Music/' + MusicFN; - if (not FileExists(s)) then + if not FileExists(s) then s:= PathPrefix + '/Music/' + MusicFN; WriteToConsole(msgLoading + s + ' ');