- fixed the sound location calculations which got somewhat broken by the constant changes during the conversion.

This commit is contained in:
Christoph Oelckers 2016-03-31 21:13:32 +02:00
commit 6445615b5d
15 changed files with 131 additions and 157 deletions

View file

@ -109,7 +109,7 @@ static DVector2 FindRefPoint(line_t *ld, const DVector2 &pos)
!ld->frontsector->PortalBlocksMovement(sector_t::floor))
{
DVector2 v1 = ld->V1();
DVector2 v1 = ld->v1->fPos();
DVector2 d = ld->Delta();
double r = clamp(((pos.X - v1.X) * d.X + (pos.Y - v1.Y) * d.Y) / (d.X*d.X + d.Y*d.Y), 0., 1.);
return v1 + d*r;