Remove camera distance from the calculation for how much to offset sprites to avoid z buffer fighting.

git-svn-id: https://svn.eduke32.com/eduke32@5945 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2016-12-01 04:06:34 +00:00
parent 1c18f9d4de
commit 7d15f7fff7

View file

@ -4348,9 +4348,8 @@ int32_t polymost_lintersect(int32_t x1, int32_t y1, int32_t x2, int32_t y2,
return rv; return rv;
} }
#define TSPR_OFFSET(tspr) \ #define TSPR_OFFSET_FACTOR .0002f
(((FindDistance2D((tspr->x - globalposx), (tspr->y - globalposy)) >> 3) * .0002f) \ #define TSPR_OFFSET(tspr) (TSPR_OFFSET_FACTOR + ((tspr->owner != -1 ? tspr->owner & 63 : 0) * TSPR_OFFSET_FACTOR))
+ ((tspr->owner != -1 ? tspr->owner & 63 : 0) * .0002f))
void polymost_drawsprite(int32_t snum) void polymost_drawsprite(int32_t snum)
{ {