From: TimePath Date: Wed, 2 Dec 2015 01:52:04 +0000 (+1100) Subject: Sound: always send .wav strings X-Git-Tag: xonotic-v0.8.2~1585 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a853ff36bca341c4a328f97485d3b502efccc73d;p=xonotic%2Fxonotic-data.pk3dir.git Sound: always send .wav strings --- diff --git a/qcsrc/common/sounds/sound.qh b/qcsrc/common/sounds/sound.qh index 60b1c4c4b..1e0275858 100644 --- a/qcsrc/common/sounds/sound.qh +++ b/qcsrc/common/sounds/sound.qh @@ -110,18 +110,24 @@ CLASS(Sound, Object) x(ogg) \ x(flac) \ /**/ - string full, relative; - #define tryext(ext) { if (fexists(full = strcat("sound/", relative = strcat(base, "." #ext)))) break; } + string relative; + #define tryext(ext) { if (fexists(strcat("sound/", relative = strcat(base, "." #ext)))) break; } do { extensions(tryext); #undef tryext #undef extensions - LOG_WARNINGF("Missing sound: \"%s\"\n", full); + LOG_WARNINGF("Missing sound: \"%s\"\n", strcat("sound/", base)); +#ifdef CSQC return string_null; +#endif } while (0); +#ifdef SVQC + return strcat(base, ".wav"); // let the client engine decide +#else return relative; +#endif } METHOD(Sound, sound_precache, void(entity this)) {