diff --git a/src/gl/scene/gl_weapon.cpp b/src/gl/scene/gl_weapon.cpp index cfa5c05d7..a2a12f947 100644 --- a/src/gl/scene/gl_weapon.cpp +++ b/src/gl/scene/gl_weapon.cpp @@ -129,19 +129,20 @@ 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) + if (!(mirror) != !(psp->Flags & PSPF_FLIP)) { - fU1=tex->GetSpriteUL(); - fV1=tex->GetSpriteVT(); - fU2=tex->GetSpriteUR(); - fV2=tex->GetSpriteVB(); + fU2 = tex->GetSpriteUL(); + fV1 = tex->GetSpriteVT(); + fU1 = tex->GetSpriteUR(); + fV2 = tex->GetSpriteVB(); } else { - fU2=tex->GetSpriteUL(); - fV1=tex->GetSpriteVT(); - fU1=tex->GetSpriteUR(); - fV2=tex->GetSpriteVB(); + fU1 = tex->GetSpriteUL(); + fV1 = tex->GetSpriteVT(); + fU2 = tex->GetSpriteUR(); + fV2 = tex->GetSpriteVB(); + } if (tex->GetTransparent() || OverrideShader != -1) diff --git a/src/p_pspr.h b/src/p_pspr.h index c0a695e04..084fe8fce 100644 --- a/src/p_pspr.h +++ b/src/p_pspr.h @@ -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 diff --git a/src/r_things.cpp b/src/r_things.cpp index 8e306e04f..dbe66da5e 100644 --- a/src/r_things.cpp +++ b/src/r_things.cpp @@ -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; diff --git a/wadsrc/static/actors/constants.txt b/wadsrc/static/actors/constants.txt index dce2488c2..df3bb860b 100644 --- a/wadsrc/static/actors/constants.txt +++ b/wadsrc/static/actors/constants.txt @@ -598,6 +598,7 @@ enum PSPF_ADDBOB = 1 << 1, PSPF_POWDOUBLE = 1 << 2, PSPF_CVARFAST = 1 << 3, + PSPF_FLIP = 1 << 6, }; // Default psprite layers