- In A_ReFire, allow refiring when a weapon is pending, but weapon switching is not okay at this time.

SVN r4067 (trunk)
This commit is contained in:
Randy Heit 2013-02-07 20:38:41 +00:00
parent 522a940ccf
commit 2cf141e914

View file

@ -733,21 +733,21 @@ DEFINE_ACTION_FUNCTION_PARAMS(AInventory, A_ReFire)
void A_ReFire(AActor *self, FState *state)
{
player_t *player = self->player;
bool pending;
if (NULL == player)
{
return;
}
if ((player->cmd.ucmd.buttons&BT_ATTACK)
&& !player->ReadyWeapon->bAltFire
&& player->PendingWeapon == WP_NOCHANGE && player->health)
pending = player->PendingWeapon == WP_NOCHANGE && (player->WeaponState & WF_WEAPONSWITCHOK);
if ((player->cmd.ucmd.buttons & BT_ATTACK)
&& !player->ReadyWeapon->bAltFire && !pending && player->health > 0)
{
player->refire++;
P_FireWeapon (player, state);
}
else if ((player->cmd.ucmd.buttons&BT_ALTATTACK)
&& player->ReadyWeapon->bAltFire
&& player->PendingWeapon == WP_NOCHANGE && player->health)
else if ((player->cmd.ucmd.buttons & BT_ALTATTACK)
&& player->ReadyWeapon->bAltFire && !pending && player->health > 0)
{
player->refire++;
P_FireWeaponAlt (player, state);
@ -826,10 +826,6 @@ DEFINE_ACTION_FUNCTION(AInventory, A_Lower)
P_SetPsprite (player, ps_weapon, NULL);
return;
}
/* if (player->PendingWeapon != WP_NOCHANGE)
{ // [RH] Make sure we're actually changing weapons.
player->ReadyWeapon = player->PendingWeapon;
} */
// [RH] Clear the flash state. Only needed for Strife.
P_SetPsprite (player, ps_flash, NULL);
P_BringUpWeapon (player);