From f495937ded9d491cd663adbb12b0014a2591c138 Mon Sep 17 00:00:00 2001 From: SouDescolado Date: Sun, 17 May 2026 13:56:32 -0300 Subject: [PATCH] Enable Garrison button only when it should Fixes https://github.com/rekterakathom/Overthrow/issues/135 As @hirsja95 mentioned, the logic was flawed. It was: Checking if the player dont have a base AND Checking if a player is close to a base. So if the player neither has a base nor is close to one, would return False, and since the ! is outside the parenthesis, it would make the check return True, making the button visible. Ironically, it would disable the garrisson button if the player had a base and was close to it --- addons/overthrow_main/functions/UI/dialogs/fn_mainMenu.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/overthrow_main/functions/UI/dialogs/fn_mainMenu.sqf b/addons/overthrow_main/functions/UI/dialogs/fn_mainMenu.sqf index 8e395f3f..85fbfe35 100644 --- a/addons/overthrow_main/functions/UI/dialogs/fn_mainMenu.sqf +++ b/addons/overthrow_main/functions/UI/dialogs/fn_mainMenu.sqf @@ -474,7 +474,7 @@ if (_obpos distance player < 250) then { }; } else { private _base = player call OT_fnc_nearestBase; - if !(isNil "_base" && { (_base select 0) distance player < 100 }) then { + if (!isNil "_base" && { (_base select 0) distance player < 100 }) then { ctrlEnable [1621, true]; } else { ctrlEnable [1621, false];