From d30c94c70998417422f201b2e5c3b536a075538b Mon Sep 17 00:00:00 2001
From: Mitch Richters <mjr4077au@gmail.com>
Date: Wed, 20 Oct 2021 20:54:08 +1100
Subject: [PATCH] - Blood: Re-fix lighter when changing from TNT to aerosol.

* Fixes #564.
---
 source/games/blood/src/weapon.cpp | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)

diff --git a/source/games/blood/src/weapon.cpp b/source/games/blood/src/weapon.cpp
index fa469bfe8..7d7566954 100644
--- a/source/games/blood/src/weapon.cpp
+++ b/source/games/blood/src/weapon.cpp
@@ -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())
             {
-                pPlayer->weaponState = 2;
-                StartQAV(pPlayer, kQAVBUNDOWN);
-                WeaponRaise(pPlayer);
-                return;
+                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, 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)