Use a range instead of strict equality when deciding head sounds

- See http://forum.zdoom.org/viewtopic.php?f=7&t=51583
This commit is contained in:
Randy Heit 2016-04-17 20:14:25 -05:00
parent 2661a94fe9
commit bf629d2590

View file

@ -2090,7 +2090,7 @@ FMOD_MODE FMODSoundRenderer::SetChanHeadSettings(SoundListener *listener, FMOD::
}
return oldmode;
}
else if (cpos == pos)
else if ((cpos - pos).LengthSquared() < (0.0004 * 0.0004))
{ // Head relative
return (oldmode & ~FMOD_3D) | FMOD_2D;
}