- fixed: +FLIPSPRITE works in mirrors in OpenGL now.

This commit is contained in:
Rachael Alexanderson 2017-05-03 15:56:33 -04:00
parent 00a4993654
commit 5a450b5eaa

View file

@ -814,7 +814,12 @@ void GLSprite::Process(AActor* thing, sector_t * sector, int thruportal)
if (thing->renderflags & RF_YFLIP) std::swap(vt, vb);
gltexture->GetSpriteRect(&r);
if ((mirror ^ !!(thing->renderflags & RF_XFLIP)) || (thing->flags7 & MF7_SPRITEFLIP))
// [SP] SpriteFlip
if (thing->flags7 & MF7_SPRITEFLIP)
thing->renderflags ^= RF_XFLIP;
if (mirror ^ !!(thing->renderflags & RF_XFLIP))
{
r.left = -r.width - r.left; // mirror the sprite's x-offset
ul = gltexture->GetSpriteUL();
@ -826,6 +831,9 @@ void GLSprite::Process(AActor* thing, sector_t * sector, int thruportal)
ur = gltexture->GetSpriteUL();
}
if (thing->flags7 & MF7_SPRITEFLIP) // [SP] Flip back
thing->renderflags ^= RF_XFLIP;
r.Scale(sprscale.X, sprscale.Y);
float rightfac = -r.left;