renamed snd_reload to snd_unloadallsounds to clarify its purpose
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 22 May 2007 20:07:56 +0000 (20:07 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 22 May 2007 20:07:56 +0000 (20:07 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7339 d7cf8633-e32d-0410-b094-e92efae38249

darkplaces.txt
fs.c
snd_main.c
snd_null.c
sound.h

index 18ab371..c5e96e8 100644 (file)
@@ -1200,7 +1200,7 @@ setinfo                                           modifies your userinfo
 sizedown                                          decrease view size (decreases viewsize cvar)\r
 sizeup                                            increase view size (increases viewsize cvar)\r
 skins                                             downloads missing qw skins from server\r
-snd_reload                                        reload all sound files\r
+snd_unloadallsounds                               unload all sound files\r
 snd_restart                                       restart sound system\r
 soundinfo                                         print sound system information (such as channels and speed)\r
 soundlist                                         list loaded sounds\r
diff --git a/fs.c b/fs.c
index 89e290a..6df0612 100644 (file)
--- a/fs.c
+++ b/fs.c
@@ -1230,8 +1230,8 @@ qboolean FS_ChangeGameDirs(int numgamedirs, char gamedirs[][MAX_QPATH], qboolean
        // exec the new config
        Host_LoadConfig_f();
 
-       // reinitialize the loaded sounds
-       S_Reload_f();
+       // unload all sounds so they will be reloaded from the new files as needed
+       S_UnloadAllSounds_f();
 
        // reinitialize renderer (this reloads hud/console background/etc)
        R_Modules_Restart();
index 1734bae..e29b55e 100644 (file)
@@ -724,7 +724,7 @@ void S_Init(void)
        Cmd_AddCommand("soundlist", S_SoundList_f, "list loaded sounds");
        Cmd_AddCommand("soundinfo", S_SoundInfo_f, "print sound system information (such as channels and speed)");
        Cmd_AddCommand("snd_restart", S_Restart_f, "restart sound system");
-       Cmd_AddCommand("snd_reload", S_Reload_f, "reload all sound files");
+       Cmd_AddCommand("snd_unloadallsounds", S_UnloadAllSounds_f, "unload all sound files");
 
        Cvar_RegisterVariable(&nosound);
        Cvar_RegisterVariable(&snd_precache);
@@ -773,10 +773,10 @@ void S_Terminate (void)
 
 /*
 ==================
-S_Reload_f
+S_UnloadAllSounds_f
 ==================
 */
-void S_Reload_f (void)
+void S_UnloadAllSounds_f (void)
 {
        int i;
 
index 6eb6b94..df7463f 100755 (executable)
@@ -91,7 +91,7 @@ qboolean S_IsSoundPrecached (const sfx_t *sfx)
        return false;
 }
 
-void S_Reload_f (void)
+void S_UnloadAllSounds_f (void)
 {
 }
 
diff --git a/sound.h b/sound.h
index fbd5755..b1e0cb0 100644 (file)
--- a/sound.h
+++ b/sound.h
@@ -60,7 +60,7 @@ void S_Terminate (void);
 
 void S_Startup (void);
 void S_Shutdown (void);
-void S_Reload_f (void);
+void S_UnloadAllSounds_f (void);
 
 void S_Update(const matrix4x4_t *listenermatrix);
 void S_ExtraUpdate (void);