From fa002e6df3184e417f7d32d3a15fd6dd917d8549 Mon Sep 17 00:00:00 2001 From: Bobby Battista Date: Mon, 6 Apr 2026 16:41:35 -0400 Subject: [PATCH 1/2] fix(input): Use time-based double tap for unit group centering --- .../Source/GameClient/MessageStream/SelectionXlat.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp index b9519dbeb20..cd859531ab1 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp @@ -1076,7 +1076,7 @@ GameMessageDisposition SelectionTranslator::translateGameMessage(const GameMessa { DEBUG_LOG(("META: select team %d",group)); - UnsignedInt now = TheGameLogic->getFrame(); + UnsignedInt now = timeGetTime(); if ( m_lastGroupSelTime == 0 ) { m_lastGroupSelTime = now; @@ -1085,7 +1085,7 @@ GameMessageDisposition SelectionTranslator::translateGameMessage(const GameMessa Bool performSelection = TRUE; // check for double-press to jump view - if ( now - m_lastGroupSelTime < 20 && group == m_lastGroupSelGroup ) + if ( now - m_lastGroupSelTime < TheGlobalData->m_doubleClickTimeMS && group == m_lastGroupSelGroup ) { DEBUG_LOG(("META: DOUBLETAP select team %d",group)); // TheSuperHackers @bugfix Stubbjax 26/05/2025 Perform selection on double-press @@ -1157,7 +1157,7 @@ GameMessageDisposition SelectionTranslator::translateGameMessage(const GameMessa { DEBUG_LOG(("META: select team %d",group)); - UnsignedInt now = TheGameLogic->getFrame(); + UnsignedInt now = timeGetTime(); if ( m_lastGroupSelTime == 0 ) { m_lastGroupSelTime = now; @@ -1165,7 +1165,7 @@ GameMessageDisposition SelectionTranslator::translateGameMessage(const GameMessa // check for double-press to jump view - if ( now - m_lastGroupSelTime < 20 && group == m_lastGroupSelGroup ) + if ( now - m_lastGroupSelTime < TheGlobalData->m_doubleClickTimeMS && group == m_lastGroupSelGroup ) { DEBUG_LOG(("META: DOUBLETAP select team %d",group)); Player *player = ThePlayerList->getLocalPlayer(); From f4066e91171ce62a3f53a0de1cc6308ea3f90e9c Mon Sep 17 00:00:00 2001 From: Bobby Battista Date: Mon, 6 Apr 2026 16:41:42 -0400 Subject: [PATCH 2/2] fix(input): Use time-based double tap for unit group centering in Generals --- .../Source/GameClient/MessageStream/SelectionXlat.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Generals/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp b/Generals/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp index fb54e6c071b..e1f9be35633 100644 --- a/Generals/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp @@ -1001,7 +1001,7 @@ GameMessageDisposition SelectionTranslator::translateGameMessage(const GameMessa { DEBUG_LOG(("META: select team %d",group)); - UnsignedInt now = TheGameLogic->getFrame(); + UnsignedInt now = timeGetTime(); if ( m_lastGroupSelTime == 0 ) { m_lastGroupSelTime = now; @@ -1010,7 +1010,7 @@ GameMessageDisposition SelectionTranslator::translateGameMessage(const GameMessa Bool performSelection = TRUE; // check for double-press to jump view - if ( now - m_lastGroupSelTime < 20 && group == m_lastGroupSelGroup ) + if ( now - m_lastGroupSelTime < TheGlobalData->m_doubleClickTimeMS && group == m_lastGroupSelGroup ) { DEBUG_LOG(("META: DOUBLETAP select team %d",group)); // TheSuperHackers @bugfix Stubbjax 26/05/2025 Perform selection on double-press @@ -1082,7 +1082,7 @@ GameMessageDisposition SelectionTranslator::translateGameMessage(const GameMessa { DEBUG_LOG(("META: select team %d",group)); - UnsignedInt now = TheGameLogic->getFrame(); + UnsignedInt now = timeGetTime(); if ( m_lastGroupSelTime == 0 ) { m_lastGroupSelTime = now; @@ -1090,7 +1090,7 @@ GameMessageDisposition SelectionTranslator::translateGameMessage(const GameMessa // check for double-press to jump view - if ( now - m_lastGroupSelTime < 20 && group == m_lastGroupSelGroup ) + if ( now - m_lastGroupSelTime < TheGlobalData->m_doubleClickTimeMS && group == m_lastGroupSelGroup ) { DEBUG_LOG(("META: DOUBLETAP select team %d",group)); Player *player = ThePlayerList->getLocalPlayer();