- minor int_* replacements in the backend.

This commit is contained in:
Christoph Oelckers 2022-09-26 20:34:49 +02:00
parent a409e03570
commit 38998f36b5
2 changed files with 2 additions and 5 deletions

View file

@ -61,10 +61,7 @@ static inline void get_floorspr_points(DCoreActor *spr, int32_t px, int32_t py,
inline int32_t spriteGetZOfSlope(const spritetypebase* tspr, int dax, int day, int heinum)
{
if (heinum == 0) return tspr->int_pos().Z;
int const j = DMulScale(bsin(tspr->int_ang() + 1024), day - tspr->int_pos().Y, -bsin(tspr->int_ang() + 512), dax - tspr->int_pos().X, 4);
return tspr->int_pos().Z + MulScale(heinum, j, 18);
return spriteGetZOfSlopef(tspr, DVector2(dax * inttoworld, day * inttoworld), heinum) * zworldtoint;
}

View file

@ -1101,7 +1101,7 @@ void HWWall::Process(HWDrawInfo* di, walltype* wal, sectortype* frontsector, sec
int HWWall::CheckWallSprite(tspritetype* spr, tspritetype* last)
{
// If the position changed we need to recalculate everything.
if (spr->pos.XY() != last->pos.XY() || spr->sectp != last->sectp || spr->int_ang() != last->int_ang()) return 3;
if (spr->pos.XY() != last->pos.XY() || spr->sectp != last->sectp || spr->angle != last->angle) return 3;
// if the horizontal orientation changes we need to recalculate the walls this attaches to, but not the positioning.
if (spr->xrepeat != last->xrepeat || spr->xoffset != last->xoffset || spr->picnum != last->picnum || ((spr->cstat ^ last->cstat) & CSTAT_SPRITE_XFLIP)) return 2;