From e72bfa8addf343dbd949d41e889af577449e2da5 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 11 Apr 2016 21:02:44 +0200 Subject: [PATCH] - fixed: For finding the listener's sector the sound code used the wrong coordinate. --- src/s_sound.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/s_sound.cpp b/src/s_sound.cpp index d1fee071e..ac4dbc78f 100644 --- a/src/s_sound.cpp +++ b/src/s_sound.cpp @@ -773,7 +773,7 @@ static void CalcSectorSoundOrg(const DVector3 &listenpos, const sector_t *sec, i if (!(i_compatflags & COMPATF_SECTORSOUNDS)) { // Are we inside the sector? If yes, the closest point is the one we're on. - if (P_PointInSector(pos.X, pos.Y) == sec) + if (P_PointInSector(listenpos.X, listenpos.Y) == sec) { pos.X = (float)listenpos.X; pos.Z = (float)listenpos.Y;