Performance fix for Polymost wall sprite z-fighting avoidance

git-svn-id: https://svn.eduke32.com/eduke32@5787 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2016-06-21 00:32:47 +00:00
parent 212e84ce21
commit aca0807a81

View file

@ -4577,14 +4577,17 @@ void polymost_drawsprite(int32_t snum)
{ {
w = polymost_findwall(tspr, &tsiz, &walldist); w = polymost_findwall(tspr, &tsiz, &walldist);
if (s != -1 && w != -1) if (s != -1)
{ {
wallspriteinfo_t *ws = &wsprinfo[s]; wallspriteinfo_t *ws = &wsprinfo[s];
ws->wall = w; ws->wall = w;
ws->wdist = walldist;
ws->wrev = wallchanged[w]; if (w != -1)
ws->srev = spritechanged[s]; {
ws->wdist = walldist;
ws->wrev = wallchanged[w];
ws->srev = spritechanged[s];
}
} }
} }
else if (s != -1) else if (s != -1)