- fixed: For finding the listener's sector the sound code used the wrong coordinate.

This commit is contained in:
Christoph Oelckers 2016-04-11 21:02:44 +02:00
parent 99ca649930
commit e72bfa8add

View file

@ -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;