mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 05:31:00 +00:00
Fixed state selection for weapon secondary fire
https://mantis.zdoom.org/view.php?id=552
This commit is contained in:
parent
5935dc706d
commit
b0a0c62af1
1 changed files with 14 additions and 6 deletions
|
@ -130,18 +130,26 @@ class Weapon : StateProvider native
|
|||
{
|
||||
player.mo.PlayAttacking2 ();
|
||||
}
|
||||
|
||||
Weapon weapon = player.ReadyWeapon;
|
||||
state flashstate = null;
|
||||
|
||||
if (flashlabel == null)
|
||||
{
|
||||
if (player.ReadyWeapon.bAltFire)
|
||||
if (weapon.bAltFire)
|
||||
{
|
||||
flashlabel = 'AltFlash';
|
||||
flashstate = weapon.FindState('AltFlash');
|
||||
}
|
||||
if (flashlabel == null)
|
||||
if (flashstate == null)
|
||||
{
|
||||
flashlabel = 'Flash';
|
||||
flashstate = weapon.FindState('Flash');
|
||||
}
|
||||
}
|
||||
player.SetPsprite(PSP_FLASH, player.ReadyWeapon.FindState(flashlabel));
|
||||
else
|
||||
{
|
||||
flashstate = weapon.FindState(flashlabel);
|
||||
}
|
||||
player.SetPsprite(PSP_FLASH, flashstate);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -738,4 +746,4 @@ class WeaponGiver : Weapon
|
|||
struct WeaponSlots native
|
||||
{
|
||||
native bool, int, int LocateWeapon(class<Weapon> weap);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue