mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 15:02:39 +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)
|
void A_ReFire(AActor *self, FState *state)
|
||||||
{
|
{
|
||||||
player_t *player = self->player;
|
player_t *player = self->player;
|
||||||
|
bool pending;
|
||||||
|
|
||||||
if (NULL == player)
|
if (NULL == player)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
pending = player->PendingWeapon == WP_NOCHANGE && (player->WeaponState & WF_WEAPONSWITCHOK);
|
||||||
if ((player->cmd.ucmd.buttons & BT_ATTACK)
|
if ((player->cmd.ucmd.buttons & BT_ATTACK)
|
||||||
&& !player->ReadyWeapon->bAltFire
|
&& !player->ReadyWeapon->bAltFire && !pending && player->health > 0)
|
||||||
&& player->PendingWeapon == WP_NOCHANGE && player->health)
|
|
||||||
{
|
{
|
||||||
player->refire++;
|
player->refire++;
|
||||||
P_FireWeapon (player, state);
|
P_FireWeapon (player, state);
|
||||||
}
|
}
|
||||||
else if ((player->cmd.ucmd.buttons & BT_ALTATTACK)
|
else if ((player->cmd.ucmd.buttons & BT_ALTATTACK)
|
||||||
&& player->ReadyWeapon->bAltFire
|
&& player->ReadyWeapon->bAltFire && !pending && player->health > 0)
|
||||||
&& player->PendingWeapon == WP_NOCHANGE && player->health)
|
|
||||||
{
|
{
|
||||||
player->refire++;
|
player->refire++;
|
||||||
P_FireWeaponAlt (player, state);
|
P_FireWeaponAlt (player, state);
|
||||||
|
@ -826,10 +826,6 @@ DEFINE_ACTION_FUNCTION(AInventory, A_Lower)
|
||||||
P_SetPsprite (player, ps_weapon, NULL);
|
P_SetPsprite (player, ps_weapon, NULL);
|
||||||
return;
|
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.
|
// [RH] Clear the flash state. Only needed for Strife.
|
||||||
P_SetPsprite (player, ps_flash, NULL);
|
P_SetPsprite (player, ps_flash, NULL);
|
||||||
P_BringUpWeapon (player);
|
P_BringUpWeapon (player);
|
||||||
|
|
Loading…
Reference in a new issue