]> github.com/historicalsource and other repositories - xray.git/commitdiff
Don't crash if game cannot find the sound (#3) master
authorLVutner <kkamil724@gmail.com>
Mon, 10 Jun 2019 09:21:47 +0000 (11:21 +0200)
committerXottab_DUTY <Xottab-DUTY@users.noreply.github.com>
Mon, 10 Jun 2019 09:21:47 +0000 (14:21 +0500)
trunk/xrSound/SoundRender_Source_loader.cpp

index 7c7d3a1c2548790f2709701b7f3eb1034b07eb37..13be098fccd81d9434f8d73b966608b98a52f760 100644 (file)
@@ -129,11 +129,11 @@ void CSoundRender_Source::load(LPCSTR name)
        strconcat                       (sizeof(fn),fn,N,".ogg");
        if (!FS.exist("$level$",fn))    FS.update_path  (fn,"$game_sounds$",fn);
 
-#ifdef _EDITOR
+
        if (!FS.exist(fn)){ 
                FS.update_path  (fn,"$game_sounds$","$no_sound.ogg");
     }
-#endif
+
        LoadWave                        (fn);           //.R_ASSERT(wave);
        SoundRender->cache.cat_create   (CAT, dwBytesTotal);