- fixed: Global sounds were started as 3D if anything but ATTN_NONE was used, regarding in them not playing.

This commit is contained in:
Christoph Oelckers 2019-12-19 09:43:43 +01:00
parent ef01c34346
commit c35ebeadff

View file

@ -577,7 +577,7 @@ FSoundChan *SoundEngine::StartSound(int type, const void *source,
if (chanflags & (CHANF_UI|CHANF_NOPAUSE)) startflags |= SNDF_NOPAUSE; if (chanflags & (CHANF_UI|CHANF_NOPAUSE)) startflags |= SNDF_NOPAUSE;
if (chanflags & CHANF_UI) startflags |= SNDF_NOREVERB; if (chanflags & CHANF_UI) startflags |= SNDF_NOREVERB;
if (attenuation > 0) if (attenuation > 0 && type != SOURCE_None)
{ {
LoadSound3D(sfx, &SoundBuffer); LoadSound3D(sfx, &SoundBuffer);
chan = (FSoundChan*)GSnd->StartSound3D (sfx->data3d, &listener, float(volume), rolloff, float(attenuation), pitch, basepriority, pos, vel, channel, startflags, NULL); chan = (FSoundChan*)GSnd->StartSound3D (sfx->data3d, &listener, float(volume), rolloff, float(attenuation), pitch, basepriority, pos, vel, channel, startflags, NULL);