Skip to content

Zero Hour rebuilt from EA's source: x64, Direct3D 11, VS2022/CMake, ~60 original bugs fixed, an AI that builds a base. Bring your own game.

fix(gameclient): make Ctrl+Q select infantry, not every armed unit

Olcay Seygan6b90ab54f358
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 915456c18..9c6287298 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -101,6 +101,11 @@ decoyed, the reservation lapses within half a second and your units open up agai
The practical effect is that a group kills more things per volley. Same units, same weapons, fewer
rounds spent on the dead.
+**Ctrl+Q takes your infantry.** The three keys under your left hand are one per arm — Q infantry,
+W vehicles, E aircraft — but Q was grabbing every armed thing you own, tanks and jets included, so
+there was no way to pull just the foot soldiers out of a mixed army. Press it twice for the whole
+map. Ctrl+A is still everything at once.
+
## Your whole base, on one strip
The original showed you one factory at a time and made you click through the rest.
diff --git a/GeneralsMD/Code/GameEngine/Include/Common/MessageStream.h b/GeneralsMD/Code/GameEngine/Include/Common/MessageStream.h
index 4bbcf41fb..10ba0d9e4 100644
--- a/GeneralsMD/Code/GameEngine/Include/Common/MessageStream.h
+++ b/GeneralsMD/Code/GameEngine/Include/Common/MessageStream.h
@@ -255,7 +255,7 @@ public:
MSG_META_SELECT_HERO, ///< selects player's hero character, if exists...
MSG_META_SELECT_ALL, ///< selects all units across screen
MSG_META_SELECT_ALL_AIRCRAFT, ///< selects all air units just like select all
- MSG_META_SELECT_ALL_MILITARY, ///< selects armed units (KINDOF_CAN_ATTACK), screen first then map (Ctrl+Q/W/Z/X/C)
+ MSG_META_SELECT_ALL_MILITARY, ///< selects foot soldiers (KINDOF_INFANTRY), screen first then map (Ctrl+Q)
MSG_META_SELECT_ALL_VEHICLES, ///< selects ground vehicles (no dozers / harvesters), screen first then map (Ctrl+Q/W/Z/X/C)
MSG_META_SELECT_ALL_BARRACKS, ///< selects barracks, screen first then map (Ctrl+Q/W/Z/X/C)
MSG_META_SELECT_ALL_WARFACTORIES, ///< selects war factories, screen first then map (Ctrl+Q/W/Z/X/C)
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp
index dc542ae8c..733f0ed7b 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp
@@ -2980,7 +2980,17 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
if( t == GameMessage::MSG_META_SELECT_ALL_AIRCRAFT )
requiredKindofs.set(KINDOF_AIRCRAFT);
else if( t == GameMessage::MSG_META_SELECT_ALL_MILITARY )
- requiredKindofs.set(KINDOF_CAN_ATTACK); // armed units of any kind; plain SELECT_ALL takes the unarmed ones too
+ {
+ //
+ // Q W E under the left hand is infantry / vehicles / aircraft - one key per
+ // arm, so each one narrows the selection to something you can give a single
+ // order to. This used to be KINDOF_CAN_ATTACK, which is every armed unit
+ // there is: it swept up the tanks and the aircraft the other two keys are
+ // for and left no way to grab the foot soldiers on their own. Ctrl+A is
+ // still there for everything at once.
+ //
+ requiredKindofs.set(KINDOF_INFANTRY);
+ }
else if( t == GameMessage::MSG_META_SELECT_ALL_VEHICLES )
{
requiredKindofs.set(KINDOF_VEHICLE);