From 3ea70980f97a25bbcdb8dc213e7564f2a215841b Mon Sep 17 00:00:00 2001 From: Leonard2 Date: Sat, 18 Jun 2016 09:46:55 +0200 Subject: [PATCH] Fixed: the strife firehands were interpolated if a mod used the layer before them The flags were also already reset, no need to do it twice --- src/g_strife/a_strifestuff.cpp | 5 +---- src/p_pspr.cpp | 4 ++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/g_strife/a_strifestuff.cpp b/src/g_strife/a_strifestuff.cpp index 8f571328b..c0e280762 100644 --- a/src/g_strife/a_strifestuff.cpp +++ b/src/g_strife/a_strifestuff.cpp @@ -352,10 +352,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_ItBurnsItBurns) if (self->player != nullptr && self->player->mo == self) { - DPSprite *psp = self->player->GetPSprite(PSP_STRIFEHANDS); - psp->Flags &= PSPF_ADDWEAPON | PSPF_ADDBOB; - psp->y = WEAPONTOP; - psp->SetState(self->FindState("FireHands")); + P_SetPsprite(self->player, PSP_STRIFEHANDS, self->FindState("FireHands")); self->player->ReadyWeapon = nullptr; self->player->PendingWeapon = WP_NOCHANGE; diff --git a/src/p_pspr.cpp b/src/p_pspr.cpp index 148c788fa..94a0084dd 100644 --- a/src/p_pspr.cpp +++ b/src/p_pspr.cpp @@ -229,6 +229,10 @@ DPSprite *player_t::GetPSprite(PSPLayers layer) { pspr->Flags = (PSPF_ADDWEAPON|PSPF_ADDBOB|PSPF_CVARFAST|PSPF_POWDOUBLE); } + if (layer == PSP_STRIFEHANDS) + { + pspr->y = WEAPONTOP; + } pspr->oldx = pspr->x; pspr->oldy = pspr->y;