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.

feat(gameclient): box leaves workers beside an army in classic too

Olcay Seygan36ce7241f35d
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4bf9a9286..bcfd815a5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -88,6 +88,7 @@ found and fixed — EA's own, not port damage.**
- The dark plate behind Exit, Restart and the options screen in a match covers the whole picture. It used to sit in a 4:3 frame in the middle, so a widescreen left the battlefield bright down both sides. The box itself keeps the shape it was drawn in.
- Buildings select together again, which the one interface had taken away. Shift-click them, drag a box over them, or double-click one for every building of its kind on the screen; select four War Factories and each tank you click goes to whichever has the shortest queue. Double-click a unit and every one of that kind whose feet sit in the picture is taken, including the ones sitting past the camera's far clip that used to be skipped. A building and a unit still never share a selection.
- Formation lines are back for everyone. With move, attack move or guard armed, a left drag spreads the selection along the line you draw again; since the one interface it drew a selection box instead, because the line was switched off for the Classic mouse that every player now runs. A drag with no order armed is still the selection box.
+- A box round your soldiers leaves the worker among them behind again. The rule that a box holding anything military drops the dozers, workers, supply trucks, Chinooks and hackers from it was switched off for the Classic mouse, which is the one every player now runs, so the dozer came along with the tanks. It holds for every box now, a Shift box added to a selection included. A box of workers alone still takes the workers, and a click or a double click on one still takes it.
- Every key is yours to move. The launcher's Hotkeys page draws the command bar of every building and unit each general can field, cameos and letters as the game shows them, and a click and a keypress gives any button a new letter or none. Two buttons on one bar that would share a letter are marked before you play. The keyboard commands are there too, from bookmarks and team keys to the camera, along with the ones Zero Hour never bound: select all your infantry, vehicles or aircraft, every barracks, war factory or airfield, the next idle worker or unit, pause, the general's promotions, the three signals to your allies and the general's powers. Your keys are yours alone; the other players in a match keep theirs, and a match never refuses you for them. Every mod you install brings its own generals to the page, ShockWave's fifteen next to Zero Hour's thirteen, and a key you give a ShockWave button stays with ShockWave.
- Some keys now mean one thing on every bar: A attack move, S stop, G guard, Y rally point, V evacuate, N sell, C combat drop, and H for land mines, camo netting and the GLA worker's switch to fake buildings. Sell sits on its own key, so emptying a bunker can never sell it. The 188 buttons Zero Hour had put on one of those letters take another, kept off the 18 letters under your left hand where the bar leaves room (the Avenger is J now), and no bar gained a clash doing it. Those letters are still yours to hand out: the Hotkeys page gives A or H to any other button you pick, and marks the clash. On a bar that has the order as well, the order keeps its key: a Barracks button on A fires from A, and a tank's A is still attack move.
- The Hotkeys page is in the game as well, as the last tab of the options screen, so a key can move without quitting to the launcher: from the main menu, or from Esc in the middle of a match. Every command sits on the left with its key. On the right you pick a general and one of his buildings or units, and its command bar is listed button by button, each with its cameo and its letter. Double-click a line, or press Enter or Change, and then the key; Esc lets go. Two buttons of one bar on one letter, or two commands on one key, turn red, and the line under the lists names them. Accept writes the file the launcher writes, so a key set in either place is there in the other, and a key changed in a match works from the next press.
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp
index 03e9a570f..63797640e 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp
@@ -802,8 +802,9 @@ GameMessageDisposition SelectionTranslator::translateGameMessage(const GameMessa
// A box with an army in it takes the army and leaves the dozers and trucks standing among
// it; a box of workers alone still takes the workers. Drag-only, like the filters above,
- // and not in Classic, which is the 2003 box.
- if (!isPoint && !TheGlobalData->isClassicMouse())
+ // but in Classic too: Classic is what every player gets, and there a box round an army
+ // still came back with the dozer standing in it.
+ if (!isPoint)
prioritizeMilitaryBoxSelection(drawablesThatWillSelect, isSelectableMilitaryInBox);
SelectionInfo si;