|
|
|
@ -276,7 +276,11 @@ void S_StartSound(int entnum, int entchannel, sfx_t *sfx, vec3_t origin, float f |
|
|
|
FMOD_Channel_SetVolume(channel, fvol); |
|
|
|
|
|
|
|
// Anything coming from the view entity will always be full volume, and entchannel -1 is used for local sounds (e.g. menu sounds) |
|
|
|
FMOD_Channel_Set3DLevel(channel, entchannel < 0 || entnum == cl.viewentity ? 0.0f : 1.0f); |
|
|
|
if (entchannel < 0 || entnum == cl.viewentity) |
|
|
|
{ |
|
|
|
FMOD_Channel_Set3DLevel(channel, 0.0f); |
|
|
|
FMOD_Channel_SetPriority(channel, 64); // Ensure local sounds always get priority over other entities |
|
|
|
} |
|
|
|
|
|
|
|
// Use ChannelControl::setDelay and ChannelControl::getDSPClock to add a delay to move sounds out of phase if necessary |
|
|
|
|
|
|
|
|