457 if (voicepack <> nil) then |
457 if (voicepack <> nil) then |
458 begin |
458 begin |
459 if (voicepack^.chunks[snd] = nil) and (Soundz[snd].Path = ptVoices) and (Soundz[snd].FileName <> '') then |
459 if (voicepack^.chunks[snd] = nil) and (Soundz[snd].Path = ptVoices) and (Soundz[snd].FileName <> '') then |
460 begin |
460 begin |
461 s:= cPathz[Soundz[snd].Path] + '/' + voicepack^.name + '/' + Soundz[snd].FileName; |
461 s:= cPathz[Soundz[snd].Path] + '/' + voicepack^.name + '/' + Soundz[snd].FileName; |
462 // Fallback to sndFirePunch1 if sndFirePunch{2,6} is missing |
462 // Fallback to sndFirePunch1 / sndOw1 / sndOoff1 if a “higher-numbered” sound is missing |
463 if (not pfsExists(s)) and (snd in [sndFirePunch2, sndFirePunch3, sndFirePunch4, sndFirePunch5, sndFirePunch6]) then |
463 if (not pfsExists(s)) then |
464 begin |
464 begin |
465 snd := sndFirePunch1; |
465 if (snd in [sndFirePunch2, sndFirePunch3, sndFirePunch4, sndFirePunch5, sndFirePunch6]) then |
|
466 snd := sndFirePunch1 |
|
467 else if (snd in [sndOw2, sndOw3, sndOw4]) then |
|
468 snd := sndOw1 |
|
469 else if (snd in [sndOoff2, sndOoff3]) then |
|
470 snd := sndOoff1; |
466 s:= cPathz[Soundz[snd].Path] + '/' + voicepack^.name + '/' + Soundz[snd].FileName; |
471 s:= cPathz[Soundz[snd].Path] + '/' + voicepack^.name + '/' + Soundz[snd].FileName; |
467 end; |
472 end; |
468 WriteToConsole(msgLoading + s + ' '); |
473 WriteToConsole(msgLoading + s + ' '); |
469 rwops := rwopsOpenRead(s); |
474 rwops := rwopsOpenRead(s); |
470 |
475 |