mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 22:11:43 +00:00
- 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:
parent
522a940ccf
commit
2cf141e914
1 changed files with 6 additions and 10 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue