Polymer: Fix ART offset and sprite flipping interaction.

git-svn-id: https://svn.eduke32.com/eduke32@3633 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
Plagman 2013-03-31 23:26:40 +00:00
parent e3ae81262e
commit 0abef3b8cd

View file

@ -3578,6 +3578,15 @@ void polymer_updatesprite(int32_t snum)
flipu = flipv = 0; 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)) if (pr_billboardingmode && !((tspr->cstat>>4) & 3))
{ {
// do surgery on the face tspr to make it look like a wall sprite // 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; tspr->ang = (viewangle + 1024) & 2047;
} }
if (flipu) {
xoff = -xoff;
}
if (flipv) {
yoff = -yoff;
}
switch ((tspr->cstat>>4) & 3) switch ((tspr->cstat>>4) & 3)
{ {
case 0: case 0:
@ -3620,15 +3637,6 @@ void polymer_updatesprite(int32_t snum)
break; 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); bglGetFloatv(GL_MODELVIEW_MATRIX, spritemodelview);
bglPopMatrix(); bglPopMatrix();