Added a new state that the weapon jumps to when it is lowered all the way and the player is currently dead

The state is undefined by default to preserve the original behavior of having the weapon layer deleted which modders can now avoid by defining it properly
This commit is contained in:
Leonard2 2016-07-01 05:41:14 +02:00
parent 759753eadc
commit 5907ff662d
2 changed files with 2 additions and 1 deletions

View file

@ -214,6 +214,7 @@ xx(Brainexplode)
// Weapon animator names. // Weapon animator names.
xx(Select) xx(Select)
xx(Deselect) xx(Deselect)
xx(DeadLowered)
xx(Ready) xx(Ready)
xx(Fire) xx(Fire)
xx(Hold) xx(Hold)

View file

@ -1087,7 +1087,7 @@ DEFINE_ACTION_FUNCTION(AInventory, A_Lower)
{ // Player is dead, so don't bring up a pending weapon { // Player is dead, so don't bring up a pending weapon
// Player is dead, so keep the weapon off screen // Player is dead, so keep the weapon off screen
P_SetPsprite(player, PSP_FLASH, nullptr); P_SetPsprite(player, PSP_FLASH, nullptr);
psp->SetState(nullptr); psp->SetState(player->ReadyWeapon->FindState(NAME_DeadLowered));
return 0; return 0;
} }
// [RH] Clear the flash state. Only needed for Strife. // [RH] Clear the flash state. Only needed for Strife.