- Exhumed: Replace use of getzrange_old() inline wrapper with getzrange().

This commit is contained in:
Mitch Richters 2021-10-30 22:37:43 +11:00 committed by Christoph Oelckers
parent add3481e40
commit 1d39bb371e
2 changed files with 4 additions and 2 deletions

View file

@ -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;

View file

@ -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);