mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-13 11:30:44 +00:00
Fix spray -> tnt -> spray animation bug
This commit is contained in:
parent
715bca4d53
commit
8765b583f0
1 changed files with 11 additions and 2 deletions
|
@ -675,7 +675,7 @@ void WeaponLower(PLAYER *pPlayer)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (pPlayer->newWeapon == 6)
|
||||
if (pPlayer->newWeapon == 6) // do not put away lighter if TNT was selected while throwing a spray can
|
||||
{
|
||||
pPlayer->weaponState = 2;
|
||||
StartQAV(pPlayer, 11, -1, 0);
|
||||
|
@ -742,7 +742,7 @@ void WeaponLower(PLAYER *pPlayer)
|
|||
switch (prevState)
|
||||
{
|
||||
case 1:
|
||||
if (!VanillaMode() && (pPlayer->newWeapon == 7)) // do not put away lighter if TNT was selected while throwing a spray can
|
||||
if (!VanillaMode() && (pPlayer->newWeapon == 7)) // do not put away lighter after TNT is thrown if while throwing the weapon was switched already to spray
|
||||
{
|
||||
pPlayer->weaponState = 2;
|
||||
StartQAV(pPlayer, 17, -1, 0);
|
||||
|
@ -2235,6 +2235,15 @@ void WeaponProcess(PLAYER *pPlayer) {
|
|||
pPlayer->newWeapon = 12;
|
||||
}
|
||||
}
|
||||
else if ((pPlayer->newWeapon == 7) && !VanillaMode() && !DemoRecordStatus())
|
||||
{
|
||||
if ((pPlayer->curWeapon == 7) && (pPlayer->weaponState == 2)) // fix spray can state glitch when switching from spray to tnt and back quickly
|
||||
{
|
||||
pPlayer->weaponState = 1;
|
||||
pPlayer->newWeapon = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (pPlayer->pXSprite->health == 0 || pPlayer->hasWeapon[pPlayer->newWeapon] == 0)
|
||||
{
|
||||
pPlayer->newWeapon = 0;
|
||||
|
|
Loading…
Reference in a new issue