MSG_ReadVector(pos, cl.protocol);
- S_StartSound (ent, channel, cl.sound_precache[sound_num], pos, volume/255.0, attenuation);
+ S_StartSound (ent, channel, cl.sound_precache[sound_num], pos, volume/255.0f, attenuation);
}
/*
Mod_PurgeUnused();
// do the same for sounds
- S_ClearUsed();
- for (i = 1;i < numsounds;i++)
- {
- CL_KeepaliveMessage();
- S_TouchSound(parse_sound_precache[i], true);
- }
- S_PurgeUnused();
+ S_ServerSounds (parse_sound_precache, numsounds);
// now we try to load everything that is new
for (i=1 ; i<numsounds ; i++)
{
CL_KeepaliveMessage();
- cl.sound_precache[i] = S_PrecacheSound(parse_sound_precache[i], true, true);
+
+ // Don't lock the sfx here, S_ServerSounds already did that
+ cl.sound_precache[i] = S_PrecacheSound(parse_sound_precache[i], true, true, false);
}
// local state
Con_DPrintf("CL_ValidateState: no such frame %i in \"%s\"\n", s->frame, model->name);
s->frame = 0;
}
- if (model && s->skin > 0 && s->skin >= model->numskins)
+ if (model && s->skin > 0 && s->skin >= model->numskins && !(s->lightpflags & PFLAGS_FULLDYNAMIC))
{
Con_DPrintf("CL_ValidateState: no such skin %i in \"%s\"\n", s->skin, model->name);
s->skin = 0;
vol = MSG_ReadByte ();
atten = MSG_ReadByte ();
- S_StaticSound (cl.sound_precache[sound_num], org, vol, atten);
+ S_StaticSound (cl.sound_precache[sound_num], org, vol/255.0f, atten);
}
void CL_ParseEffect (void)
*/
void CL_InitTEnts (void)
{
- 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);
+ cl_sfx_wizhit = S_PrecacheSound ("wizard/hit.wav", false, true, true);
+ cl_sfx_knighthit = S_PrecacheSound ("hknight/hit.wav", false, true, true);
+ cl_sfx_tink1 = S_PrecacheSound ("weapons/tink1.wav", false, true, true);
+ cl_sfx_ric1 = S_PrecacheSound ("weapons/ric1.wav", false, true, true);
+ cl_sfx_ric2 = S_PrecacheSound ("weapons/ric2.wav", false, true, true);
+ cl_sfx_ric3 = S_PrecacheSound ("weapons/ric3.wav", false, true, true);
+ cl_sfx_r_exp3 = S_PrecacheSound ("weapons/r_exp3.wav", false, true, true);
}
void CL_ParseBeam (model_t *m, int lightning)
case svc_setpause:
cl.paused = MSG_ReadByte ();
if (cl.paused)
- {
CDAudio_Pause ();
- S_PauseGameSounds ();
- }
else
- {
CDAudio_Resume ();
- S_ResumeGameSounds ();
- }
+ S_PauseGameSounds (cl.paused);
break;
case svc_signonnum: