From eeff17c550e2aeaf3bdbe51b81f832d63f5e6752 Mon Sep 17 00:00:00 2001 From: Leonard2 Date: Wed, 1 Jun 2016 23:33:08 +0200 Subject: [PATCH] Account for this on the renderer's side instead This fixes the weapon's layer behaving differently when called from A_Overlay (the flag would be set in this case breaking the offsets) --- src/p_pspr.cpp | 4 ---- src/r_things.cpp | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/p_pspr.cpp b/src/p_pspr.cpp index 0f01522d15..1ff46faf0f 100644 --- a/src/p_pspr.cpp +++ b/src/p_pspr.cpp @@ -214,10 +214,6 @@ DPSprite *player_t::GetPSprite(PSPLayers layer) { // The targeter layers were affected by those. pspr->Flags |= (PSPF_CVARFAST|PSPF_POWDOUBLE); } - if (layer != PSP_FLASH) - { // Only the flash layer should follow the weapon. - pspr->Flags &= ~PSPF_ADDWEAPON; - } } return pspr; diff --git a/src/r_things.cpp b/src/r_things.cpp index caca6a11c9..91c88afa97 100644 --- a/src/r_things.cpp +++ b/src/r_things.cpp @@ -1337,7 +1337,7 @@ void R_DrawPSprite(DPSprite *pspr, AActor *owner, float bobx, float boby, double sy += boby; } - if (pspr->Flags & PSPF_ADDWEAPON) + if (pspr->Flags & PSPF_ADDWEAPON && pspr->GetID() != PSP_WEAPON) { sx += wx; sy += wy;