From 75cb8c00a67dc97720903c11e3bd7db037fef83b Mon Sep 17 00:00:00 2001 From: Leonard2 Date: Sat, 18 Jun 2016 11:29:02 +0200 Subject: [PATCH] Fixed: the flags weren't properly reset if a mod used the old layers before the code used them --- src/p_pspr.cpp | 10 +++++++--- src/p_pspr.h | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/p_pspr.cpp b/src/p_pspr.cpp index e63490110..87afc64fc 100644 --- a/src/p_pspr.cpp +++ b/src/p_pspr.cpp @@ -216,14 +216,18 @@ DPSprite *player_t::GetPSprite(PSPLayers layer) } // Always update the caller here in case we switched weapon - // or if the layer was being used by an inventory item before. + // or if the layer was being used by something else before. pspr->Caller = newcaller; if (newcaller != oldcaller) - { // Only change the flags if this layer was created now or if we updated the caller. + { // Only reset flags if this layer was created now or if it was being used before. if (layer >= PSP_TARGETCENTER) { // The targeter layers were affected by those. - pspr->Flags |= (PSPF_CVARFAST|PSPF_POWDOUBLE); + pspr->Flags = (PSPF_CVARFAST|PSPF_POWDOUBLE); + } + else + { + pspr->Flags = (PSPF_ADDWEAPON|PSPF_ADDBOB|PSPF_CVARFAST|PSPF_POWDOUBLE); } } diff --git a/src/p_pspr.h b/src/p_pspr.h index 2c7a36518..a7cf49f8c 100644 --- a/src/p_pspr.h +++ b/src/p_pspr.h @@ -42,7 +42,7 @@ class FArchive; // drawn directly on the view screen, // coordinates are given for a 320*200 view screen. // -enum PSPLayers // These are all called by the owner's ReadyWeapon. +enum PSPLayers { PSP_STRIFEHANDS = -1, PSP_WEAPON = 1,