diff --git a/polymer/build/src/engine.c b/polymer/build/src/engine.c index f4f4badc9..6d8d51f5f 100644 --- a/polymer/build/src/engine.c +++ b/polymer/build/src/engine.c @@ -6088,6 +6088,8 @@ if ((!r_depthpeeling) || (rendmode < 3)) if ((!r_depthpeeling) || (rendmode < 3)) #endif { + curpolygonoffset = 0; + pos.x = globalposx; pos.y = globalposy; @@ -6118,6 +6120,7 @@ if ((!r_depthpeeling) || (rendmode < 3)) if ((sameside(&maskeq, &spr, &pos) == 0) && sameside(&p1eq, &middle, &spr) && sameside(&p2eq, &middle, &spr)) { + bglDisable(GL_POLYGON_OFFSET_FILL); drawsprite(i); tspriteptr[i] = NULL; } @@ -6130,8 +6133,12 @@ if ((!r_depthpeeling) || (rendmode < 3)) { spritesortcnt--; if (tspriteptr[spritesortcnt] != NULL) + { + bglDisable(GL_POLYGON_OFFSET_FILL); drawsprite(spritesortcnt); + } } + bglDisable(GL_POLYGON_OFFSET_FILL); } /* depthpeeling */ #ifdef USE_OPENGL diff --git a/polymer/build/src/polymost.c b/polymer/build/src/polymost.c index cb50c21cc..416cab1cb 100644 --- a/polymer/build/src/polymost.c +++ b/polymer/build/src/polymost.c @@ -4021,7 +4021,7 @@ if (tspr->cstat&2) { if (!(tspr->cstat&512)) method = 2+4; else method = 3+4; } } break; } - if (((tspr->cstat&2) || (gltexmayhavealpha(tspr->picnum,tspr->pal))) && (peelcompiling)) + if (((tspr->cstat&2) || (gltexmayhavealpha(tspr->picnum,tspr->pal)))) { curpolygonoffset += 0.01f; bglEnable(GL_POLYGON_OFFSET_FILL);