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.
C++ cmakecnccommand-and-conquercppdirectx11game-enginegame-preservationgeneralsrtssage-enginex64zero-hour
fix(gameclient): no mine clearing on the stand-in builder's bar
Olcay Seygane0adadaccf56
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 67d89b5be..c87c4c861 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -678,7 +678,7 @@ A third pass went through the generals' powers, promotions and unit abilities.- Hold shift and drag, and the row is one stroke. Press where the first building goes, drag the way the row runs, and a ghost appears for every building that fits end to end along the line, all facing the way the first one was turned. The row runs exactly the way you drag it, at 20 degrees as happily as along the map's edge, and packs the buildings as close as their shape allows: one turned onto the line of the row stands wall to wall with the next, and a factory keeps its door lane clear. A row of Power Plants turned square to the map packs 44 apart; it used to go down on whole grid squares, 50 apart, with a strip of dirt at every joint. It stops at the last building your bank can pay for. A ghost that lands on a rock or someone's tank turns red and is left out when you let go; the rest go up. With two or three workers selected the buildings are shared out to the nearest free one, and the ones nobody is free for wait as plans until a worker comes off its job. A plain drag still turns the building, and walls still tile the way they always did.- While that row is on the cursor, the wheel opens and closes the space between the buildings, one grid square a notch. The one where you pressed and the one under the cursor stay put; what changes is how many stand between them and how far apart those are. It will not pack them any tighter than they already sit against each other, and it will not take either end away to make the gap. Letting go places the row and takes the building off the cursor, so the next click is not another one. Holding shift and clicking them out one at a time still keeps the ghost up.- Hold Alt and drag while placing a building, and you lay out a block of them instead of a row. Ghosts stand for as many as your money covers, a blocked spot is skipped, and your builders work through the block in order.-- With nothing selected the command bar shows your builders' buildings again. Put one down and the idle worker nearest the spot walks over and builds it; when every worker is busy, the nearest one takes it on after the job in hand. A shift-dragged row placed this way is shared out among your idle workers. The bar keeps showing the same worker while you place, so a GLA worker switched to fake buildings stays on that page, and a fake is only ever handed to a worker who is on it. That last part holds with workers selected too: select a real-page and a fake-page worker together and a building goes to the one that can build it, where it used to go to the nearest and be refused. A replay with such a mixed selection in it plays back differently.+- With nothing selected the command bar shows your builders' buildings again, and only those: the mine-clearing order stays on a dozer you actually select. Put one down and the idle worker nearest the spot walks over and builds it; when every worker is busy, the nearest one takes it on after the job in hand. A shift-dragged row placed this way is shared out among your idle workers. The bar keeps showing the same worker while you place, so a GLA worker switched to fake buildings stays on that page, and a fake is only ever handed to a worker who is on it. That last part holds with workers selected too: select a real-page and a fake-page worker together and a building goes to the one that can build it, where it used to go to the nearest and be refused. A replay with such a mixed selection in it plays back differently.- Turning a building no longer turns everything you build afterwards. A wheeled heading still carries from one wall to the next, but the next supply centre comes out facing the way it was designed to.- A building you point at blocked ground slides to the nearest spot it fits, and lands there.- The pointer keeps its build cursor while you place, even passing over your own buildings.diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarCommand.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarCommand.cppindex df73c1281..277a34d90 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarCommand.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarCommand.cpp@@ -400,6 +400,16 @@ void ControlBar::populateCommand( Object *obj )const CommandButton *slot[ MAX_COMMANDS_PER_SET ];buildCommandLayout( obj, commandSet, slot );+ // a builder standing in for an empty selection offers its buildings, not its orders: nobody+ // asked that dozer to go and clear mines, the owner's call+ if( m_standInBuilderID != INVALID_DRAWABLE_ID && obj->getDrawable()+ && obj->getDrawable()->getID() == m_standInBuilderID )+ {+ for( i = 0; i < MAX_COMMANDS_PER_SET; i++ )+ if( slot[ i ] && ControlBar_namedCommandPlace( slot[ i ]->getName().str() ) == COMMAND_PLACE_CLEAR_MINES )+ slot[ i ] = NULL;+ }+// populate the button with commands definedconst CommandButton *commandButton;for( i = 0; i < MAX_COMMANDS_PER_SET; i++ )