- fixing problems.

This commit is contained in:
Christoph Oelckers 2020-07-14 20:39:48 +02:00
parent 424716bb88
commit 3cd475570c

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 }; 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); 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) if (i < 0)
return 1; return 1;
@ -3041,6 +3047,12 @@ void polymost_drawsprite(int32_t snum)
vec2_t off = { 0, 0 }; 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; int32_t method = DAMETH_MASK | DAMETH_CLAMPED;
if (tspr->cstat & 2) if (tspr->cstat & 2)