From a853ff36bca341c4a328f97485d3b502efccc73d Mon Sep 17 00:00:00 2001 From: TimePath Date: Wed, 2 Dec 2015 12:52:04 +1100 Subject: [PATCH] Sound: always send .wav strings --- qcsrc/common/sounds/sound.qh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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)) { -- 2.39.2