]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_mem.c
Implement "forcenearest" particle effect key, ported from wrath-darkplaces
[xonotic/darkplaces.git] / snd_mem.c
index 5588c64295b94f8cc263e6fd12651d55aa67ce0b..482b7709493552d0e6c1f0fdeff86a17479df878 100644 (file)
--- a/snd_mem.c
+++ b/snd_mem.c
@@ -24,6 +24,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include "snd_main.h"
 #include "snd_ogg.h"
 #include "snd_wav.h"
+#ifdef USEXMP
+#include "snd_xmp.h"
+#endif
 
 
 /*
@@ -120,6 +123,13 @@ qboolean S_LoadSound (sfx_t *sfx, qboolean complain)
                        if (OGG_LoadVorbisFile (namebuffer, sfx))
                                goto loaded;
                }
+#ifdef USEXMP
+               else if (len >= 1)
+               {
+                       if (XMP_LoadModFile (namebuffer, sfx))
+                               goto loaded;
+               }
+#endif
        }
 
        // LadyHavoc: then try without the added sound/ as wav and ogg
@@ -139,6 +149,13 @@ qboolean S_LoadSound (sfx_t *sfx, qboolean complain)
                if (OGG_LoadVorbisFile (namebuffer, sfx))
                        goto loaded;
        }
+#ifdef USEXMP
+       else if (len >= 1)
+       {
+               if (XMP_LoadModFile (namebuffer, sfx))
+                       goto loaded;
+       }
+#endif
 
        // Can't load the sound!
        sfx->flags |= SFXFLAG_FILEMISSING;