diff --git a/source/core/rendering/scene/hw_drawinfo.cpp b/source/core/rendering/scene/hw_drawinfo.cpp index 2f5c7229a..678008752 100644 --- a/source/core/rendering/scene/hw_drawinfo.cpp +++ b/source/core/rendering/scene/hw_drawinfo.cpp @@ -413,7 +413,7 @@ void HWDrawInfo::CreateScene(bool portal) auto sect = eff.geosectorwarp[i]; for (auto w = 0; w < sect->wallnum; w++) { - auto wal = &wall[sect->wallptr + w]; + auto wal = sect->firstWall() + w; wal->x += eff.geox[i]; wal->y += eff.geoy[i]; } @@ -432,7 +432,7 @@ void HWDrawInfo::CreateScene(bool portal) auto sect = eff.geosectorwarp[i]; for (auto w = 0; w < sect->wallnum; w++) { - auto wal = &wall[sect->wallptr + w]; + auto wal = sect->firstWall() + w; wal->x -= eff.geox[i]; wal->y -= eff.geoy[i]; } @@ -445,7 +445,7 @@ void HWDrawInfo::CreateScene(bool portal) auto sect = eff.geosectorwarp2[i]; for (auto w = 0; w < sect->wallnum; w++) { - auto wal = &wall[sect->wallptr + w]; + auto wal = sect->firstWall() + w; wal->x += eff.geox2[i]; wal->y += eff.geoy2[i]; } @@ -463,7 +463,7 @@ void HWDrawInfo::CreateScene(bool portal) auto sect = eff.geosectorwarp2[i]; for (auto w = 0; w < sect->wallnum; w++) { - auto wal = &wall[sect->wallptr + w]; + auto wal = sect->firstWall() + w; wal->x -= eff.geox2[i]; wal->y -= eff.geoy2[i]; } diff --git a/source/games/blood/src/prediction.cpp b/source/games/blood/src/prediction.cpp index 18a008495..8d22e2f9f 100644 --- a/source/games/blood/src/prediction.cpp +++ b/source/games/blood/src/prediction.cpp @@ -621,7 +621,7 @@ void fakeActProcessSprites(void) speed = MulScale(speed, pXSector->busy, 16); } if (pSector->floorstat&64) - angle = (GetWallAngle(pSector->wallptr)+512)&2047; + angle = (GetWallAngle(pSector->firstWall())+512)&2047; predict.xvel += MulScale(speed,Cos(angle), 30); predict.yvel += MulScale(speed,Sin(angle), 30); } diff --git a/source/games/sw/src/player.cpp b/source/games/sw/src/player.cpp index 11649050c..e27a2973a 100644 --- a/source/games/sw/src/player.cpp +++ b/source/games/sw/src/player.cpp @@ -1600,9 +1600,7 @@ void SlipSlope(PLAYERp pp) if (!TEST(sectu->flags, SECTFU_SLIDE_SECTOR) || !TEST(pp->cursector->floorstat, FLOOR_STAT_SLOPE)) return; - auto wallptr = pp->cursector->firstWall(); - - ang = getangle(wallptr->delta()); + ang = getangle(pp->cursector->firstWall()->delta()); ang = NORM_ANGLE(ang + 512);