This commit is contained in:
raa-eruanna 2016-10-12 03:15:03 -04:00
commit 15c08f73d5
4 changed files with 13 additions and 10 deletions

View file

@ -129,20 +129,21 @@ void FGLRenderer::DrawPSprite (player_t * player,DPSprite *psp, float sx, float
y1 = viewwindowy + vh / 2 - (ftexturemid * scale);
y2 = y1 + (r.height * scale) + 1;
if (!mirror)
{
fU1=tex->GetSpriteUL();
fV1=tex->GetSpriteVT();
fU2=tex->GetSpriteUR();
fV2=tex->GetSpriteVB();
}
else
if (!(mirror) != !(psp->Flags & PSPF_FLIP))
{
fU2 = tex->GetSpriteUL();
fV1 = tex->GetSpriteVT();
fU1 = tex->GetSpriteUR();
fV2 = tex->GetSpriteVB();
}
else
{
fU1 = tex->GetSpriteUL();
fV1 = tex->GetSpriteVT();
fU2 = tex->GetSpriteUR();
fV2 = tex->GetSpriteVB();
}
if (tex->GetTransparent() || OverrideShader != -1)
{

View file

@ -57,6 +57,7 @@ enum PSPFlags
PSPF_ADDBOB = 1 << 1,
PSPF_POWDOUBLE = 1 << 2,
PSPF_CVARFAST = 1 << 3,
PSPF_FLIP = 1 << 6,
};
class DPSprite : public DObject

View file

@ -1422,7 +1422,7 @@ void R_DrawPSprite(DPSprite *pspr, AActor *owner, float bobx, float boby, double
vis->pic = tex;
vis->Style.ColormapNum = 0;
if (flip)
if (!(flip) != !(pspr->Flags & PSPF_FLIP))
{
vis->xiscale = -FLOAT2FIXED(pspritexiscale * tex->Scale.X);
vis->startfrac = (tex->GetWidth() << FRACBITS) - 1;

View file

@ -598,6 +598,7 @@ enum
PSPF_ADDBOB = 1 << 1,
PSPF_POWDOUBLE = 1 << 2,
PSPF_CVARFAST = 1 << 3,
PSPF_FLIP = 1 << 6,
};
// Default psprite layers