From aca0807a819fd7342f9dbcfba67003c4ce2cff25 Mon Sep 17 00:00:00 2001 From: terminx Date: Tue, 21 Jun 2016 00:32:47 +0000 Subject: [PATCH] Performance fix for Polymost wall sprite z-fighting avoidance git-svn-id: https://svn.eduke32.com/eduke32@5787 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/polymost.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/polymer/eduke32/build/src/polymost.c b/polymer/eduke32/build/src/polymost.c index 2ac3740a0..da41c3f10 100644 --- a/polymer/eduke32/build/src/polymost.c +++ b/polymer/eduke32/build/src/polymost.c @@ -4577,14 +4577,17 @@ void polymost_drawsprite(int32_t snum) { w = polymost_findwall(tspr, &tsiz, &walldist); - if (s != -1 && w != -1) + if (s != -1) { wallspriteinfo_t *ws = &wsprinfo[s]; - ws->wall = w; - ws->wdist = walldist; - ws->wrev = wallchanged[w]; - ws->srev = spritechanged[s]; + + if (w != -1) + { + ws->wdist = walldist; + ws->wrev = wallchanged[w]; + ws->srev = spritechanged[s]; + } } } else if (s != -1)