mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 21:21:04 +00:00
- Avoid issues with misused Strife actions.
This commit is contained in:
parent
24c73071f4
commit
56508a2d82
1 changed files with 18 additions and 11 deletions
|
@ -352,18 +352,22 @@ DEFINE_ACTION_FUNCTION(AActor, A_ItBurnsItBurns)
|
|||
|
||||
if (self->player != nullptr && self->player->mo == self)
|
||||
{
|
||||
DPSprite *psp = self->player->GetPSprite(PSP_STRIFEHANDS);
|
||||
if (psp != nullptr)
|
||||
FState *firehands = self->FindState("FireHands");
|
||||
if (firehands != NULL)
|
||||
{
|
||||
psp->SetState(self->FindState("FireHands"));
|
||||
psp->Flags &= PSPF_ADDWEAPON | PSPF_ADDBOB;
|
||||
psp->y = WEAPONTOP;
|
||||
}
|
||||
DPSprite *psp = self->player->GetPSprite(PSP_STRIFEHANDS);
|
||||
if (psp != nullptr)
|
||||
{
|
||||
psp->SetState(firehands);
|
||||
psp->Flags &= PSPF_ADDWEAPON | PSPF_ADDBOB;
|
||||
psp->y = WEAPONTOP;
|
||||
}
|
||||
|
||||
self->player->ReadyWeapon = nullptr;
|
||||
self->player->PendingWeapon = WP_NOCHANGE;
|
||||
self->player->playerstate = PST_LIVE;
|
||||
self->player->extralight = 3;
|
||||
self->player->ReadyWeapon = nullptr;
|
||||
self->player->PendingWeapon = WP_NOCHANGE;
|
||||
self->player->playerstate = PST_LIVE;
|
||||
self->player->extralight = 3;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -388,7 +392,10 @@ DEFINE_ACTION_FUNCTION(AActor, A_CrispyPlayer)
|
|||
|
||||
DPSprite *psp;
|
||||
psp = self->player->GetPSprite(PSP_STRIFEHANDS);
|
||||
psp->SetState(psp->GetState() + (self->FindState("FireHandsLower") - self->FindState("FireHands")));
|
||||
FState *firehandslower = self->FindState("FireHandsLower");
|
||||
FState *firehands = self->FindState("FireHands");
|
||||
if (firehandslower != NULL && firehands != NULL && firehands < firehandslower)
|
||||
psp->SetState(psp->GetState() + (firehandslower - firehands));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue