]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Sound: always send .wav strings
authorTimePath <andrew.hardaker1995@gmail.com>
Wed, 2 Dec 2015 01:52:04 +0000 (12:52 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Wed, 2 Dec 2015 01:52:04 +0000 (12:52 +1100)
qcsrc/common/sounds/sound.qh

index 60b1c4c4bf3c433a59548e1f0fb09974276f85c6..1e02758580b7a7e2c982fd36dbd3019013809a61 100644 (file)
@@ -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))
        {