for (sfx = known_sfx;sfx;sfx = sfxnext)
{
sfxnext = sfx->next;
- S_FreeSfx (sfx);
+ S_FreeSfx (sfx, false);
}
}
// calculate the volumes
ch->leftvol = (int) (scale + pan);
ch->rightvol = (int) (scale - pan);
+ //Con_Printf("%f %f %f:%f %f %f:%f %f:%d %d\n", ch->origin[0], ch->origin[1], ch->origin[2], source_vec[0], source_vec[1], source_vec[2], scale, pan, ch->leftvol, ch->rightvol);
}
// Adjust volume of static sounds
return -1;
}
+ if (entnum && entnum >= cl_max_entities)
+ CL_ExpandEntities(entnum);
+
// Pick a channel to play on
target_chan = SND_PickChannel(entnum, entchannel);
if (!target_chan)
// Local sounds must not be freed
sfx->flags |= SFXFLAG_PERMANENTLOCK;
- ch_ind = S_StartSound (cl.viewentity, 0, sfx, vec3_origin, 1, 1);
+ ch_ind = S_StartSound (cl.viewentity, 0, sfx, vec3_origin, 1, 0);
if (ch_ind < 0)
return false;