shithub: choc

Download patch

ref: 7f03c58cbf63a63bb5a105e06f9f675bf60adfc7
parent: e49be7d6b31db00b43e356fc3b1314ccd1fe0487
author: Simon Howard <[email protected]>
date: Sat Oct 27 12:31:44 EDT 2018

music: Add argument to disable substitute music.

This mirrors the -nomusic command line argument by just disabling the
substitute music.

--- a/src/i_sound.c
+++ b/src/i_sound.c
@@ -195,7 +195,7 @@
 
 void I_InitSound(boolean use_sfx_prefix)
 {
-    boolean nosound, nosfx, nomusic;
+    boolean nosound, nosfx, nomusic, nomusicpacks;
 
     //!
     // @vanilla
@@ -221,6 +221,13 @@
 
     nomusic = M_CheckParm("-nomusic") > 0;
 
+    //!
+    //
+    // Disable substitution music packs.
+    //
+
+    nomusicpacks = M_ParmExists("-nomusicpacks");
+
     // Auto configure the music pack directory.
     M_SetMusicPackDir();
 
@@ -251,7 +258,7 @@
         }
 
         // We may also have substitute MIDIs we can load.
-        if (music_module != NULL)
+        if (!nomusicpacks && music_module != NULL)
         {
             music_packs_active = music_pack_module.Init();
         }