The strife firehands now make proper use of the psprite layers

This commit is contained in:
Leonard2 2016-06-03 19:46:31 +02:00
parent afa708c138
commit 0b88bae458
3 changed files with 8 additions and 4 deletions

View File

@ -352,8 +352,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_ItBurnsItBurns)
if (self->player != nullptr && self->player->mo == self) if (self->player != nullptr && self->player->mo == self)
{ {
self->player->GetPSprite(PSP_WEAPON)->SetState(self->FindState("FireHands")); self->player->GetPSprite(PSP_STRIFEHANDS)->SetState(self->FindState("FireHands"));
self->player->GetPSprite(PSP_FLASH)->SetState(nullptr);
self->player->ReadyWeapon = nullptr; self->player->ReadyWeapon = nullptr;
self->player->PendingWeapon = WP_NOCHANGE; self->player->PendingWeapon = WP_NOCHANGE;
self->player->playerstate = PST_LIVE; self->player->playerstate = PST_LIVE;
@ -381,7 +380,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CrispyPlayer)
self->player->playerstate = PST_DEAD; self->player->playerstate = PST_DEAD;
DPSprite *psp; DPSprite *psp;
psp = self->player->GetPSprite(PSP_WEAPON); psp = self->player->GetPSprite(PSP_STRIFEHANDS);
psp->SetState(psp->GetState() + (self->FindState("FireHandsLower") - self->FindState("FireHands"))); psp->SetState(psp->GetState() + (self->FindState("FireHandsLower") - self->FindState("FireHands")));
} }
return 0; return 0;
@ -393,7 +392,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_HandLower)
if (self->player != nullptr) if (self->player != nullptr)
{ {
DPSprite *psp = self->player->GetPSprite(PSP_WEAPON); DPSprite *psp = self->player->GetPSprite(PSP_STRIFEHANDS);
psp->y += 9; psp->y += 9;
if (psp->y > WEAPONBOTTOM*2) if (psp->y > WEAPONBOTTOM*2)
{ {

View File

@ -187,6 +187,10 @@ DPSprite *player_t::GetPSprite(PSPLayers layer)
newcaller = mo->FindInventory(RUNTIME_CLASS(APowerTargeter), true); newcaller = mo->FindInventory(RUNTIME_CLASS(APowerTargeter), true);
} }
} }
else if (layer == PSP_STRIFEHANDS)
{
newcaller = mo;
}
else else
{ {
newcaller = ReadyWeapon; newcaller = ReadyWeapon;

View File

@ -44,6 +44,7 @@ class FArchive;
// //
enum PSPLayers // These are all called by the owner's ReadyWeapon. enum PSPLayers // These are all called by the owner's ReadyWeapon.
{ {
PSP_STRIFEHANDS = -1,
PSP_WEAPON = 1, PSP_WEAPON = 1,
PSP_FLASH = 1000, PSP_FLASH = 1000,
PSP_TARGETCENTER = INT_MAX - 2, PSP_TARGETCENTER = INT_MAX - 2,