- sfx = S_PrecacheSound (va ("cdtracks/track%02u.wav", track), false, true, false);
+ if(track >= 1)
+ {
+ sfx = S_PrecacheSound (va ("cdtracks/track%02u.wav", track), false, false);
+ if (sfx == NULL || !S_IsSoundPrecached (sfx))
+ sfx = S_PrecacheSound (va ("cdtracks/track%03u.wav", track), false, false);
+ if (sfx == NULL || !S_IsSoundPrecached (sfx))
+ sfx = S_PrecacheSound (va ("cdtracks/track%02u", track), false, false);
+ if (sfx == NULL || !S_IsSoundPrecached (sfx))
+ sfx = S_PrecacheSound (va ("cdtracks/track%03u", track), false, false);
+ }
+ else
+ {
+ sfx = S_PrecacheSound (va("cdtracks/%s.wav", trackname), false, false);
+ if (sfx == NULL || !S_IsSoundPrecached (sfx))
+ sfx = S_PrecacheSound (va("cdtracks/%s", trackname), false, false);
+ }