mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-02-07 08:21:04 +00:00
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;
|
FState *nextstate;
|
||||||
if (newstate->CallAction(Owner->mo, Caller, &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)
|
if (nextstate != nullptr)
|
||||||
{
|
{
|
||||||
newstate = nextstate;
|
newstate = nextstate;
|
||||||
|
@ -1001,8 +1006,28 @@ DEFINE_ACTION_FUNCTION(AInventory, A_Raise)
|
||||||
return 0;
|
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
|
// A_GunFlash
|
||||||
|
|
|
@ -40,6 +40,7 @@ ACTOR Inventory native
|
||||||
action native A_ReFire(state flash = "");
|
action native A_ReFire(state flash = "");
|
||||||
action native A_ClearReFire();
|
action native A_ClearReFire();
|
||||||
action native A_CheckReload();
|
action native A_CheckReload();
|
||||||
|
action native A_Overlay(int layer, state start = "");
|
||||||
action native A_GunFlash(state flash = "", int flags = 0);
|
action native A_GunFlash(state flash = "", int flags = 0);
|
||||||
action native A_Saw(sound fullsound = "weapons/sawfull", sound hitsound = "weapons/sawhit", int damage = 2, class<Actor> pufftype = "BulletPuff", int flags = 0, float range = 0, float/*angle*/ spread_xy = 2.8125, float/*angle*/ spread_z = 0, float lifesteal = 0, int lifestealmax = 0, class<BasicArmorBonus> armorbonustype = "ArmorBonus");
|
action native A_Saw(sound fullsound = "weapons/sawfull", sound hitsound = "weapons/sawhit", int damage = 2, class<Actor> pufftype = "BulletPuff", int flags = 0, float range = 0, float/*angle*/ spread_xy = 2.8125, float/*angle*/ spread_z = 0, float lifesteal = 0, int lifestealmax = 0, class<BasicArmorBonus> armorbonustype = "ArmorBonus");
|
||||||
action native state A_CheckForReload(int counter, state label, bool dontincrement = false);
|
action native state A_CheckForReload(int counter, state label, bool dontincrement = false);
|
||||||
|
|
Loading…
Reference in a new issue