From 0bfb4abc1c13497752605729a198e329f999bcdc Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 1 Jan 2022 18:39:59 +0100 Subject: [PATCH] - undid some leftover placeholder code in FAFhitscan. --- source/games/sw/src/rooms.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/source/games/sw/src/rooms.cpp b/source/games/sw/src/rooms.cpp index 76510ede7..250eac8a1 100644 --- a/source/games/sw/src/rooms.cpp +++ b/source/games/sw/src/rooms.cpp @@ -146,18 +146,17 @@ FAFhitscan(int32_t x, int32_t y, int32_t z, sectortype* sect, hit.hitpos.Y -= yvect>>9; // warp to new x,y,z, sectnum - sectortype* newsect = nullptr; - if (Warp(&hit.hitpos.X, &hit.hitpos.Y, &hit.hitpos.Z, &newsect)) + if (Warp(&hit.hitpos.X, &hit.hitpos.Y, &hit.hitpos.Z, &hit.hitSector)) { // hitscan needs to pass through dest sect - ResetWallWarpHitscan(newsect); + ResetWallWarpHitscan(hit.hitSector); // NOTE: This could be recursive I think if need be auto pos = hit.hitpos; - hitscan(pos, newsect, { xvect, yvect, zvect }, hit, startclipmask); + hitscan(pos, hit.hitSector, { xvect, yvect, zvect }, hit, startclipmask); // reset hitscan block for dest sect - SetWallWarpHitscan(newsect); + SetWallWarpHitscan(hit.hitSector); return; }