mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-15 09:11:59 +00:00
Divide sound volume by number of local players
This commit is contained in:
parent
2e3f6b09af
commit
5ff1817c34
1 changed files with 4 additions and 1 deletions
|
@ -530,6 +530,7 @@ void S_StartSoundAtVolume(const void *origin_p, sfxenum_t sfx_id, INT32 volume)
|
|||
// Initialize sound parameters
|
||||
pitch = NORM_PITCH;
|
||||
priority = NORM_PRIORITY;
|
||||
volume /= (splitscreen+1);
|
||||
|
||||
if (splitscreen && listenmobj2) // Copy the sound for the split player
|
||||
{
|
||||
|
@ -1007,7 +1008,7 @@ void S_UpdateSounds(void)
|
|||
if (I_SoundIsPlaying(c->handle))
|
||||
{
|
||||
// initialize parameters
|
||||
volume = 255; // 8 bits internal volume precision
|
||||
volume = 255/(splitscreen+1); // 8 bits internal volume precision
|
||||
pitch = NORM_PITCH;
|
||||
sep = NORM_SEP;
|
||||
|
||||
|
@ -1325,6 +1326,8 @@ INT32 S_AdjustSoundParams(const mobj_t *listener, const mobj_t *source, INT32 *v
|
|||
*vol = (15 * ((S_CLIPPING_DIST - approx_dist)>>FRACBITS)) / S_ATTENUATOR;
|
||||
}
|
||||
|
||||
*vol /= (splitscreen+1);
|
||||
|
||||
return (*vol > 0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue