Added a flag to prevent the weapon from jumping to its Deselect state when the player dies

This commit is contained in:
Leonard2 2016-07-01 22:47:30 +02:00 committed by Christoph Oelckers
commit bcb18cf7d8
3 changed files with 3 additions and 1 deletions

View file

@ -510,7 +510,7 @@ void P_DropWeapon (player_t *player)
}
// Since the weapon is dropping, stop blocking switching.
player->WeaponState &= ~WF_DISABLESWITCH;
if (player->ReadyWeapon != nullptr)
if ((player->ReadyWeapon != nullptr) && (player->health > 0 || !(player->ReadyWeapon->WeaponFlags & WIF_NODEATHJUMP)))
{
P_SetPsprite(player, PSP_WEAPON, player->ReadyWeapon->GetDownState());
}