From 737cd848ce784d342e0e48c89c0ef86bc874ed6f Mon Sep 17 00:00:00 2001 From: Asdow <20314541+Asdow@users.noreply.github.com> Date: Thu, 22 Jan 2026 00:28:37 +0200 Subject: [PATCH] Make water and gas checks const --- TacticalAI/DecideAction.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/TacticalAI/DecideAction.cpp b/TacticalAI/DecideAction.cpp index 579dbaaa..dfaca9b6 100644 --- a/TacticalAI/DecideAction.cpp +++ b/TacticalAI/DecideAction.cpp @@ -18414,13 +18414,10 @@ INT8 DecideActionRedSoldier(SOLDIERTYPE* pSoldier) // determine if we happen to be in water (in which case we're in BIG trouble!) - INT8 bInWater = Water(pSoldier->sGridNo, pSoldier->pathing.bLevel); - INT8 bInDeepWater = DeepWater(pSoldier->sGridNo, pSoldier->pathing.bLevel); + const bool bInWater = Water(pSoldier->sGridNo, pSoldier->pathing.bLevel); + const bool bInDeepWater = DeepWater(pSoldier->sGridNo, pSoldier->pathing.bLevel); + const bool bInGas = DecideActionWearGasmask(pSoldier); - //////////////////////////////////////////////////////////////////////////// - // WHEN LEFT IN GAS, WEAR GAS MASK IF AVAILABLE AND NOT WORN - //////////////////////////////////////////////////////////////////////////// - INT8 bInGas = DecideActionWearGasmask(pSoldier); //////////////////////////////////////////////////////////////////////////// // WHEN IN GAS, GO TO NEAREST REACHABLE SPOT OF UNGASSED LAND