From f090da3ca86cfa4022b373b755e459b2b8f22021 Mon Sep 17 00:00:00 2001 From: staphen Date: Thu, 28 Oct 2021 01:46:41 -0400 Subject: [PATCH] [Gamepad] Prevent player applying stat points to maxed stat --- Source/controls/plrctrls.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Source/controls/plrctrls.cpp b/Source/controls/plrctrls.cpp index c97fee1beae..648133b67e8 100644 --- a/Source/controls/plrctrls.cpp +++ b/Source/controls/plrctrls.cpp @@ -1460,15 +1460,8 @@ void PerformPrimaryAction() if (chrflag && !chrbtnactive && Players[MyPlayerId]._pStatPts > 0) { CheckChrBtns(); - for (int i = 0; i < 4; i++) { - Rectangle button = ChrBtnsRect[i]; - button.position = GetPanelPosition(UiPanels::Character, button.position); - if (button.Contains(MousePosition)) { - chrbtn[i] = true; - chrbtnactive = true; - ReleaseChrBtns(false); - } - } + if (chrbtnactive) + ReleaseChrBtns(false); return; }