- Blood: Re-fix lighter when changing from TNT to aerosol.

* Fixes #564.
This commit is contained in:
Mitch Richters 2021-10-20 20:54:08 +11:00
parent fc73c67bb1
commit d30c94c709

View file

@ -748,14 +748,20 @@ void WeaponLower(PLAYER *pPlayer)
switch (prevState)
{
case 1:
if (!VanillaMode() && (pPlayer->newWeapon == kWeapSpraycan)) // do not put away lighter after TNT is thrown if while throwing the weapon was switched already to spray
if (VanillaMode())
{
StartQAV(pPlayer, kQAVLITECLO2);
}
else
{
if (pPlayer->newWeapon == kWeapSpraycan) // do not put away lighter if TNT was selected while throwing a spray can
{
pPlayer->weaponState = 2;
StartQAV(pPlayer, kQAVBUNDOWN);
StartQAV(pPlayer, kQAVCANDOWN);
WeaponRaise(pPlayer);
return;
}
StartQAV(pPlayer, kQAVLITECLO2);
}
break;
case 2:
WeaponRaise(pPlayer);
@ -836,14 +842,6 @@ void WeaponLower(PLAYER *pPlayer)
}
pPlayer->curWeapon = kWeapNone;
pPlayer->qavLoop = 0;
// BloodGDX fix for aerosol lighter just appearing when switching to it.
// https://gitlab.com/m210/BloodGDX/-/commit/bea4dedd0c429eb9639333165b6f656483c9a7f7
if(!VanillaMode() && pPlayer->curWeapon != kWeapDynamite)
{
pPlayer->weaponState = 0;
}
}
void WeaponUpdateState(PLAYER *pPlayer)