- fixed: when bringing up a new weapon the current flash state needs to be removed.

Especially when dropping the current weapon it can still be active, this is most easily observed with Strife's crossbow which loops the flash state, but it also can happen with other weapons, right after shooting.
This commit is contained in:
Christoph Oelckers 2014-05-20 10:29:27 +02:00
parent 8ec95dc58e
commit 261bc77846

View file

@ -208,6 +208,9 @@ void P_BringUpWeapon (player_t *player)
player->psprites[ps_weapon].sy = player->cheats & CF_INSTANTWEAPSWITCH player->psprites[ps_weapon].sy = player->cheats & CF_INSTANTWEAPSWITCH
? WEAPONTOP : WEAPONBOTTOM; ? WEAPONTOP : WEAPONBOTTOM;
P_SetPsprite (player, ps_weapon, newstate); P_SetPsprite (player, ps_weapon, newstate);
// make sure that the previous weapon's flash state is terminated.
// When coming here from a weapon drop it may still be active.
P_SetPsprite(player, ps_flash, NULL);
} }