From bf629d259088e3f862a3d4238bdd49787150f78f Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sun, 17 Apr 2016 20:14:25 -0500 Subject: [PATCH] Use a range instead of strict equality when deciding head sounds - See http://forum.zdoom.org/viewtopic.php?f=7&t=51583 --- src/sound/fmodsound.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sound/fmodsound.cpp b/src/sound/fmodsound.cpp index d1a4efd17..a62998d3d 100644 --- a/src/sound/fmodsound.cpp +++ b/src/sound/fmodsound.cpp @@ -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; }