mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2025-01-31 10:40:33 +00:00
- Use P_DropWeapon() everywhere it makes sense.
SVN r4045 (trunk)
This commit is contained in:
parent
5dca935305
commit
ed8a33aeaf
2 changed files with 3 additions and 3 deletions
|
@ -633,7 +633,7 @@ void P_CheckWeaponSwitch (player_t *player)
|
||||||
// Put the weapon away if the player has a pending weapon or has died.
|
// Put the weapon away if the player has a pending weapon or has died.
|
||||||
if ((player->morphTics == 0 && player->PendingWeapon != WP_NOCHANGE) || player->health <= 0)
|
if ((player->morphTics == 0 && player->PendingWeapon != WP_NOCHANGE) || player->health <= 0)
|
||||||
{
|
{
|
||||||
P_SetPsprite (player, ps_weapon, weapon->GetDownState());
|
P_DropWeapon(player);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (player->morphTics != 0)
|
else if (player->morphTics != 0)
|
||||||
|
@ -829,7 +829,7 @@ DEFINE_ACTION_FUNCTION(AInventory, A_Raise)
|
||||||
}
|
}
|
||||||
if (player->PendingWeapon != WP_NOCHANGE)
|
if (player->PendingWeapon != WP_NOCHANGE)
|
||||||
{
|
{
|
||||||
P_SetPsprite (player, ps_weapon, player->ReadyWeapon->GetDownState());
|
P_DropWeapon(player);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
psp = &player->psprites[ps_weapon];
|
psp = &player->psprites[ps_weapon];
|
||||||
|
|
|
@ -792,7 +792,7 @@ AWeapon *APlayerPawn::PickNewWeapon (const PClass *ammotype)
|
||||||
player->PendingWeapon = best;
|
player->PendingWeapon = best;
|
||||||
if (player->ReadyWeapon != NULL)
|
if (player->ReadyWeapon != NULL)
|
||||||
{
|
{
|
||||||
P_SetPsprite (player, ps_weapon, player->ReadyWeapon->GetDownState());
|
P_DropWeapon(player);
|
||||||
}
|
}
|
||||||
else if (player->PendingWeapon != WP_NOCHANGE)
|
else if (player->PendingWeapon != WP_NOCHANGE)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue