- replaced all direct access to vertex coordinates with wrapper functions.
So that code replacement can be done piece by piece and not all at once.
This commit is contained in:
parent
8d071f85b3
commit
c7ae4688a3
26 changed files with 328 additions and 299 deletions
|
|
@ -109,7 +109,7 @@ static DVector2 FindRefPoint(line_t *ld, const DVector2 &pos)
|
|||
!ld->frontsector->PortalBlocksMovement(sector_t::floor))
|
||||
{
|
||||
|
||||
DVector2 v1 = ld->v1->fPos();
|
||||
DVector2 v1 = ld->V1();
|
||||
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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue