From 1d39bb371e1cb161a516a796d82cd1b514324f4b Mon Sep 17 00:00:00 2001 From: Mitch Richters Date: Sat, 30 Oct 2021 22:37:43 +1100 Subject: [PATCH] - Exhumed: Replace use of `getzrange_old()` inline wrapper with `getzrange()`. --- source/games/exhumed/src/map.cpp | 2 +- source/games/exhumed/src/move.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source/games/exhumed/src/map.cpp b/source/games/exhumed/src/map.cpp index bde79b458..55b7abd4e 100644 --- a/source/games/exhumed/src/map.cpp +++ b/source/games/exhumed/src/map.cpp @@ -88,7 +88,7 @@ bool GameInterface::DrawAutomapPlayer(int x, int y, int z, int a, double const s { int nTile = pSprite->picnum; int ceilZ, ceilHit, floorZ, floorHit; - getzrange_old(pSprite->x, pSprite->y, pSprite->z, pSprite->sectnum, &ceilZ, &ceilHit, &floorZ, &floorHit, (pSprite->clipdist << 2) + 16, CLIPMASK0); + getzrange(&pSprite->pos, pSprite->sectnum, &ceilZ, &ceilHit, &floorZ, &floorHit, (pSprite->clipdist << 2) + 16, CLIPMASK0); int nTop, nBottom; GetSpriteExtents(pSprite, &nTop, &nBottom); int nScale = (pSprite->yrepeat + ((floorZ - nBottom) >> 8)) * z; diff --git a/source/games/exhumed/src/move.cpp b/source/games/exhumed/src/move.cpp index 12002e5fc..a4153e570 100644 --- a/source/games/exhumed/src/move.cpp +++ b/source/games/exhumed/src/move.cpp @@ -405,7 +405,9 @@ Collision movespritez(DExhumedActor* pActor, int z, int height, int, int clipdis // This function will keep the player from falling off cliffs when you're too close to the edge. // This function finds the highest and lowest z coordinates that your clipping BOX can get to. int hihit, lohit; - getzrange_old(pSprite->x, pSprite->y, pSprite->z - 256, pSprite->sectnum, + vec3_t pos = pSprite->pos; + pos.z -= 256; + getzrange(&pSprite->pos, pSprite->sectnum, &sprceiling, &hihit, &sprfloor, &lohit, 128, CLIPMASK0); hiHit.setFromEngine(hihit); loHit.setFromEngine(lohit);