Skip to content

Commit e571c9c

Browse files
authored
tweak(input): No longer deselect worker unit on cancelling building placement mode (#1430)
1 parent 31b2be7 commit e571c9c

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

Generals/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -957,10 +957,17 @@ GameMessageDisposition SelectionTranslator::translateGameMessage(const GameMessa
957957
}
958958
else
959959
{
960-
//No GUI command mode, so deselect everyone if we're in regular mouse mode.
961960
//In alternate mouse mode, right click still cancels building placement.
962-
if (! TheGlobalData->m_useAlternateMouse || TheInGameUI->getPendingPlaceSourceObjectID() != INVALID_ID)
961+
// TheSuperHackers @tweak Stubbjax 08/08/2025 Cancelling building placement no longer deselects the builder.
962+
if (TheInGameUI->getPendingPlaceSourceObjectID() != INVALID_ID)
963+
{
964+
TheInGameUI->placeBuildAvailable(NULL, NULL);
965+
disp = DESTROY_MESSAGE;
966+
TheInGameUI->setScrolling(FALSE);
967+
}
968+
else if (!TheGlobalData->m_useAlternateMouse)
963969
{
970+
//No GUI command mode, so deselect everyone if we're in regular mouse mode.
964971
deselectAll();
965972
m_lastGroupSelGroup = -1;
966973
}

GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,10 +1033,17 @@ GameMessageDisposition SelectionTranslator::translateGameMessage(const GameMessa
10331033
}
10341034
else
10351035
{
1036-
//No GUI command mode, so deselect everyone if we're in regular mouse mode.
10371036
//In alternate mouse mode, right click still cancels building placement.
1038-
if (! TheGlobalData->m_useAlternateMouse || TheInGameUI->getPendingPlaceSourceObjectID() != INVALID_ID)
1037+
// TheSuperHackers @tweak Stubbjax 08/08/2025 Cancelling building placement no longer deselects the builder.
1038+
if (TheInGameUI->getPendingPlaceSourceObjectID() != INVALID_ID)
10391039
{
1040+
TheInGameUI->placeBuildAvailable(NULL, NULL);
1041+
disp = DESTROY_MESSAGE;
1042+
TheInGameUI->setScrolling(FALSE);
1043+
}
1044+
else if (!TheGlobalData->m_useAlternateMouse)
1045+
{
1046+
//No GUI command mode, so deselect everyone if we're in regular mouse mode.
10401047
deselectAll();
10411048
}
10421049
}

0 commit comments

Comments
 (0)