Added A_Overlay
This commit is contained in:
parent
1966b61b8f
commit
1ecfb5897b
2 changed files with 26 additions and 0 deletions
|
|
@ -251,6 +251,11 @@ void DPSprite::SetState(FState *newstate, bool pending)
|
|||
FState *nextstate;
|
||||
if (newstate->CallAction(Owner->mo, Caller, &nextstate))
|
||||
{
|
||||
// It's possible this call resulted in this very layer being replaced.
|
||||
if (ObjectFlags & OF_EuthanizeMe)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (nextstate != nullptr)
|
||||
{
|
||||
newstate = nextstate;
|
||||
|
|
@ -1001,8 +1006,28 @@ DEFINE_ACTION_FUNCTION(AInventory, A_Raise)
|
|||
return 0;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// PROC A_Overlay
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AInventory, A_Overlay)
|
||||
{
|
||||
PARAM_ACTION_PROLOGUE;
|
||||
PARAM_INT (layer);
|
||||
PARAM_STATE_OPT (state) { state = nullptr; }
|
||||
|
||||
player_t *player = self->player;
|
||||
|
||||
if (player == nullptr)
|
||||
return 0;
|
||||
|
||||
DPSprite *pspr;
|
||||
pspr = new DPSprite(player, reinterpret_cast<AInventory *>(stateowner), layer);
|
||||
pspr->SetState(state);
|
||||
return 0;
|
||||
}
|
||||
|
||||
//
|
||||
// A_GunFlash
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue