- fixing problems.

This commit is contained in:
Christoph Oelckers 2020-07-14 20:39:48 +02:00
parent 424716bb88
commit 3cd475570c
1 changed files with 12 additions and 0 deletions

View File

@ -1199,6 +1199,12 @@ static inline int polymost_getclosestpointonwall(vec2_t const * const pos, int32
vec2_t const d = { POINT2(dawall).x - w.x, POINT2(dawall).y - w.y };
int64_t i = d.x * ((int64_t)pos->x - w.x) + d.y * ((int64_t)pos->y - w.y);
if (d.x == 0 && d.y == 0)
{
// In Blood's E1M1 this gets triggered for wall 522.
return 1;
}
if (i < 0)
return 1;
@ -3041,6 +3047,12 @@ void polymost_drawsprite(int32_t snum)
vec2_t off = { 0, 0 };
if ((globalorientation & 48) != 48) // only non-voxel sprites should do this
{
off = { (int32_t)tspr->xoffset + (tileLeftOffset(globalpicnum)),
(int32_t)tspr->yoffset + (tileTopOffset(globalpicnum)) };
}
int32_t method = DAMETH_MASK | DAMETH_CLAMPED;
if (tspr->cstat & 2)