]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_parse.c
Modified the sound code so it can handle sounds outside of a "sound" subdirectory.
[xonotic/darkplaces.git] / cl_parse.c
index b633acf05fd2044d3efc257d24f9fa92ec975c75..23e64ec6f8749e2586beb11c2b3ce9acace60c76 100644 (file)
@@ -411,7 +411,7 @@ void CL_ParseServerInfo (void)
        for (i = 1;i < numsounds;i++)
        {
                CL_KeepaliveMessage();
-               S_TouchSound(parse_sound_precache[i]);
+               S_TouchSound(parse_sound_precache[i], true);
        }
        S_PurgeUnused();
 
@@ -435,7 +435,7 @@ void CL_ParseServerInfo (void)
        for (i=1 ; i<numsounds ; i++)
        {
                CL_KeepaliveMessage();
-               cl.sound_precache[i] = S_PrecacheSound(parse_sound_precache[i], true);
+               cl.sound_precache[i] = S_PrecacheSound(parse_sound_precache[i], true, true);
        }
 
        // local state
@@ -957,13 +957,13 @@ CL_ParseTEnt
 */
 void CL_InitTEnts (void)
 {
-       cl_sfx_wizhit = S_PrecacheSound ("wizard/hit.wav", false);
-       cl_sfx_knighthit = S_PrecacheSound ("hknight/hit.wav", false);
-       cl_sfx_tink1 = S_PrecacheSound ("weapons/tink1.wav", false);
-       cl_sfx_ric1 = S_PrecacheSound ("weapons/ric1.wav", false);
-       cl_sfx_ric2 = S_PrecacheSound ("weapons/ric2.wav", false);
-       cl_sfx_ric3 = S_PrecacheSound ("weapons/ric3.wav", false);
-       cl_sfx_r_exp3 = S_PrecacheSound ("weapons/r_exp3.wav", false);
+       cl_sfx_wizhit = S_PrecacheSound ("wizard/hit.wav", false, true);
+       cl_sfx_knighthit = S_PrecacheSound ("hknight/hit.wav", false, true);
+       cl_sfx_tink1 = S_PrecacheSound ("weapons/tink1.wav", false, true);
+       cl_sfx_ric1 = S_PrecacheSound ("weapons/ric1.wav", false, true);
+       cl_sfx_ric2 = S_PrecacheSound ("weapons/ric2.wav", false, true);
+       cl_sfx_ric3 = S_PrecacheSound ("weapons/ric3.wav", false, true);
+       cl_sfx_r_exp3 = S_PrecacheSound ("weapons/r_exp3.wav", false, true);
 }
 
 void CL_ParseBeam (model_t *m, int lightning)