From faf5c90eef8ac5035281f64d57ee875e373a0a1f Mon Sep 17 00:00:00 2001 From: terminx Date: Fri, 9 Jun 2017 06:41:45 +0000 Subject: [PATCH] Another attempt at fixing Polymost z-fighting. Probably still sucks! :) git-svn-id: https://svn.eduke32.com/eduke32@6170 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/build/src/polymost.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/build/src/polymost.cpp b/source/build/src/polymost.cpp index 0d14427d2..ccd840faf 100644 --- a/source/build/src/polymost.cpp +++ b/source/build/src/polymost.cpp @@ -4302,8 +4302,8 @@ int32_t polymost_lintersect(int32_t x1, int32_t y1, int32_t x2, int32_t y2, return rv; } -#define TSPR_OFFSET_FACTOR .0002f -#define TSPR_OFFSET(tspr) (TSPR_OFFSET_FACTOR + ((tspr->owner != -1 ? tspr->owner & 63 : 0) * TSPR_OFFSET_FACTOR)) +#define TSPR_OFFSET_FACTOR .000008f +#define TSPR_OFFSET(tspr) ((TSPR_OFFSET_FACTOR + ((tspr->owner != -1 ? tspr->owner & 63 : 1) * TSPR_OFFSET_FACTOR)) * (sepdist(globalposx - tspr->x, globalposy - tspr->y, globalposz - tspr->z)>>3)) void polymost_drawsprite(int32_t snum) {