diff --git a/polymer/eduke32/build/src/polymer.c b/polymer/eduke32/build/src/polymer.c index 2bdf09f4b..7b1effe46 100644 --- a/polymer/eduke32/build/src/polymer.c +++ b/polymer/eduke32/build/src/polymer.c @@ -3578,6 +3578,15 @@ void polymer_updatesprite(int32_t snum) flipu = flipv = 0; + if ((tspr->cstat & 4) && (((tspr->cstat>>4) & 3) != 2)) + flipu = !flipu; + + if (!(tspr->cstat & 4) && (((tspr->cstat>>4) & 3) == 2)) + flipu = !flipu; + + if ((tspr->cstat & 8) && (((tspr->cstat>>4) & 3) != 2)) + flipv = !flipv; + if (pr_billboardingmode && !((tspr->cstat>>4) & 3)) { // do surgery on the face tspr to make it look like a wall sprite @@ -3585,6 +3594,14 @@ void polymer_updatesprite(int32_t snum) tspr->ang = (viewangle + 1024) & 2047; } + if (flipu) { + xoff = -xoff; + } + + if (flipv) { + yoff = -yoff; + } + switch ((tspr->cstat>>4) & 3) { case 0: @@ -3620,15 +3637,6 @@ void polymer_updatesprite(int32_t snum) break; } - if ((tspr->cstat & 4) && (((tspr->cstat>>4) & 3) != 2)) - flipu = !flipu; - - if (!(tspr->cstat & 4) && (((tspr->cstat>>4) & 3) == 2)) - flipu = !flipu; - - if ((tspr->cstat & 8) && (((tspr->cstat>>4) & 3) != 2)) - flipv = !flipv; - bglGetFloatv(GL_MODELVIEW_MATRIX, spritemodelview); bglPopMatrix();