Finish what r5484 started but got reverted in r5723. Cstat 1024 now works properly in Polymost without causing any side effects in Classic. It remains unimplemented in Polymer.

git-svn-id: https://svn.eduke32.com/eduke32@5857 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2016-09-09 03:12:23 +00:00
parent b73f2f3e17
commit bca7e1a91e

View file

@ -8423,11 +8423,11 @@ killsprite:
while (i) while (i)
{ {
i--; i--;
if (tspriteptr[i] != NULL && ((tspriteptr[i]->cstat & 1024) != 1024 if (tspriteptr[i] != NULL
#ifdef POLYMER #ifdef USE_OPENGL
|| getrendermode() == REND_POLYMER && (!(tspriteptr[i]->cstat & 1024) || getrendermode() != REND_POLYMOST)
#endif #endif
)) )
{ {
vec2f_t spr; vec2f_t spr;
const uspritetype *tspr = tspriteptr[i]; const uspritetype *tspr = tspriteptr[i];
@ -8499,10 +8499,7 @@ killsprite:
{ {
debugmask_add(i | 32768, tspr->owner); debugmask_add(i | 32768, tspr->owner);
drawsprite(i); drawsprite(i);
#ifdef POLYMER
if (tspr->cstat & 1024 && getrendermode() == REND_POLYMER)
continue;
#endif
tspriteptr[i] = NULL; tspriteptr[i] = NULL;
} }
} }
@ -8518,36 +8515,37 @@ killsprite:
while (i) while (i)
{ {
i--; i--;
if (tspriteptr[i] != NULL && ((tspriteptr[i]->cstat & 1024) != 1024 if (tspriteptr[i] != NULL
#ifdef POLYMER #ifdef USE_OPENGL
|| getrendermode() == REND_POLYMER && (!(tspriteptr[i]->cstat & 1024) || getrendermode() != REND_POLYMOST)
#endif #endif
)) )
{ {
debugmask_add(i | 32768, tspriteptr[i]->owner); debugmask_add(i | 32768, tspriteptr[i]->owner);
drawsprite(i); drawsprite(i);
tspriteptr[i] = NULL; tspriteptr[i] = NULL;
} }
} }
#ifdef USE_OPENGL #ifdef USE_OPENGL
if (getrendermode() >= REND_POLYMOST) if (getrendermode() == REND_POLYMOST)
bglDepthMask(GL_FALSE);
#endif
while (spritesortcnt)
{ {
spritesortcnt--; bglDepthMask(GL_FALSE);
if (tspriteptr[spritesortcnt] != NULL && (tspriteptr[spritesortcnt]->cstat & 1024))
{ while (spritesortcnt)
drawsprite(spritesortcnt); {
tspriteptr[spritesortcnt] = NULL; spritesortcnt--;
} if (tspriteptr[spritesortcnt] != NULL)
} {
Bassert(tspriteptr[spritesortcnt]->cstat & 1024);
drawsprite(spritesortcnt);
tspriteptr[spritesortcnt] = NULL;
}
}
#ifdef USE_OPENGL
if (getrendermode() >= REND_POLYMOST)
bglDepthMask(GL_TRUE); bglDepthMask(GL_TRUE);
}
#endif #endif
#ifdef POLYMER #ifdef POLYMER