]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_main.c
Unload dlcache packs when changing map or disconnecting
[xonotic/darkplaces.git] / cl_main.c
index 45cb43d6f1f39b176e7f6a137daa1c5289b8cf95..3d6e1b2672fc6b2aa9dd83d9323712469de43538 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -387,11 +387,13 @@ void CL_DisconnectEx(qbool kicked, const char *fmt, ... )
 
        Con_DPrintf("CL_Disconnect\n");
 
-    Cvar_SetValueQuick(&csqc_progcrc, -1);
+       Cvar_SetValueQuick(&csqc_progcrc, -1);
        Cvar_SetValueQuick(&csqc_progsize, -1);
        CL_VM_ShutDown();
-// stop sounds (especially looping!)
-       S_StopAllSounds ();
+       // stop sounds (especially looping!)
+       S_StopAllSounds();
+       // prevent dlcache assets from this server from interfering with the next one
+       FS_UnloadPacks_dlcache();
 
        cl.parsingtextexpectingpingforscores = 0; // just in case no reply has come yet