From 1cbc2b4c58b574c8672e8de172ae59be6e37a000 Mon Sep 17 00:00:00 2001 From: Caball009 <82909616+Caball009@users.noreply.github.com> Date: Tue, 10 Jun 2025 17:59:27 +0200 Subject: [PATCH] Fixed bug in logical expression. --- .../Source/GameClient/MessageStream/SelectionXlat.cpp | 4 +--- .../Source/GameClient/MessageStream/SelectionXlat.cpp | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Generals/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp b/Generals/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp index 1a661ece371..32df3659e7c 100644 --- a/Generals/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp @@ -929,9 +929,7 @@ GameMessageDisposition SelectionTranslator::translateGameMessage(const GameMessa delta.y = m_deselectFeedbackAnchor.y - pixel.y; Bool isClick = TRUE; - if (isClick && - abs(delta.x) > TheMouse->m_dragTolerance || - abs(delta.y) > TheMouse->m_dragTolerance) + if (abs(delta.x) > TheMouse->m_dragTolerance || abs(delta.y) > TheMouse->m_dragTolerance) { isClick = FALSE; } diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp index a5dbb81428d..a7b0cc57eed 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp @@ -1004,9 +1004,7 @@ GameMessageDisposition SelectionTranslator::translateGameMessage(const GameMessa delta.y = m_deselectFeedbackAnchor.y - pixel.y; Bool isClick = TRUE; - if (isClick && - abs(delta.x) > TheMouse->m_dragTolerance || - abs(delta.y) > TheMouse->m_dragTolerance) + if (abs(delta.x) > TheMouse->m_dragTolerance || abs(delta.y) > TheMouse->m_dragTolerance) { isClick = FALSE; }