- floatified AlignSlopes

This commit is contained in:
Christoph Oelckers 2022-09-16 19:05:21 +02:00
parent a3d1420426
commit 60e242373c

View file

@ -2188,16 +2188,14 @@ void AlignSlopes(void)
if (sect.slopewallofs) if (sect.slopewallofs)
{ {
walltype* pWall = sect.firstWall() + sect.slopewallofs; walltype* pWall = sect.firstWall() + sect.slopewallofs;
walltype* pWall2 = pWall->point2Wall();
if (pWall->twoSided()) if (pWall->twoSided())
{ {
auto pNextSector = pWall->nextSector(); auto pNextSector = pWall->nextSector();
int x = (pWall->wall_int_pos().X + pWall2->wall_int_pos().X) / 2; auto pos = pWall->center();
int y = (pWall->wall_int_pos().Y + pWall2->wall_int_pos().Y) / 2;
viewInterpolateSector(&sect); viewInterpolateSector(&sect);
alignflorslope(&sect, x, y, getflorzofslopeptr(pNextSector, x, y)); alignflorslope(&sect, DVector3(pos, getflorzofslopeptrf(pNextSector, pos)));
alignceilslope(&sect, x, y, getceilzofslopeptr(pNextSector, x, y)); alignceilslope(&sect, DVector3(pos, getceilzofslopeptrf(pNextSector, pos)));
} }
} }
} }