mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +00:00
The strife firehands now make proper use of the psprite layers
This commit is contained in:
parent
afa708c138
commit
0b88bae458
3 changed files with 8 additions and 4 deletions
|
@ -352,8 +352,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_ItBurnsItBurns)
|
|||
|
||||
if (self->player != nullptr && self->player->mo == self)
|
||||
{
|
||||
self->player->GetPSprite(PSP_WEAPON)->SetState(self->FindState("FireHands"));
|
||||
self->player->GetPSprite(PSP_FLASH)->SetState(nullptr);
|
||||
self->player->GetPSprite(PSP_STRIFEHANDS)->SetState(self->FindState("FireHands"));
|
||||
self->player->ReadyWeapon = nullptr;
|
||||
self->player->PendingWeapon = WP_NOCHANGE;
|
||||
self->player->playerstate = PST_LIVE;
|
||||
|
@ -381,7 +380,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CrispyPlayer)
|
|||
self->player->playerstate = PST_DEAD;
|
||||
|
||||
DPSprite *psp;
|
||||
psp = self->player->GetPSprite(PSP_WEAPON);
|
||||
psp = self->player->GetPSprite(PSP_STRIFEHANDS);
|
||||
psp->SetState(psp->GetState() + (self->FindState("FireHandsLower") - self->FindState("FireHands")));
|
||||
}
|
||||
return 0;
|
||||
|
@ -393,7 +392,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_HandLower)
|
|||
|
||||
if (self->player != nullptr)
|
||||
{
|
||||
DPSprite *psp = self->player->GetPSprite(PSP_WEAPON);
|
||||
DPSprite *psp = self->player->GetPSprite(PSP_STRIFEHANDS);
|
||||
psp->y += 9;
|
||||
if (psp->y > WEAPONBOTTOM*2)
|
||||
{
|
||||
|
|
|
@ -187,6 +187,10 @@ DPSprite *player_t::GetPSprite(PSPLayers layer)
|
|||
newcaller = mo->FindInventory(RUNTIME_CLASS(APowerTargeter), true);
|
||||
}
|
||||
}
|
||||
else if (layer == PSP_STRIFEHANDS)
|
||||
{
|
||||
newcaller = mo;
|
||||
}
|
||||
else
|
||||
{
|
||||
newcaller = ReadyWeapon;
|
||||
|
|
|
@ -44,6 +44,7 @@ class FArchive;
|
|||
//
|
||||
enum PSPLayers // These are all called by the owner's ReadyWeapon.
|
||||
{
|
||||
PSP_STRIFEHANDS = -1,
|
||||
PSP_WEAPON = 1,
|
||||
PSP_FLASH = 1000,
|
||||
PSP_TARGETCENTER = INT_MAX - 2,
|
||||
|
|
Loading…
Reference in a new issue