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
feat(gameclient): ctrl flips grid placement in classic too
Olcay Seygan8d771071a695
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 4dde2a79c..96c5cf905 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -32,7 +32,7 @@ found and fixed — EA's own, not port damage.**- Point at the attack, hold position or move key and a card says what it does, in English or Turkish. Those three are painted onto the grid rather than given to a unit, so the game had no card for them and showed nothing. The card stands on top of the command bar like every other button's.- HUD Size grows the console from its middle, and on a narrow screen it stops at the size that still fits.- The grid under a building you are placing is fainter and its lines thinner, and the red squares where nothing can stand are lighter, so the ground under them shows through. Untick grid placement on the Controls page and the lines go altogether.-- Hold Ctrl while placing a building and grid placement flips for as long as the key is down. With the box unticked the building snaps to the grid and the lines come up, so one flush row is a held key away; with it ticked you get a free hand for the odd building that has to sit between two squares. Classic places by its own rules and ignores Ctrl here.+- Hold Ctrl while placing a building and grid placement flips for as long as the key is down. With the box unticked the building snaps to the grid and the lines come up, so one flush row is a held key away; with it ticked you get a free hand for the odd building that has to sit between two squares. It works the same in Classic.- Your general's promotion screen opens in the middle of the screen, in the Classic interface as well, instead of hanging from the top edge. The battlefield dims behind it, and a click anywhere off the screen closes it without selecting or ordering anything underneath.## Groups attack-move at their own speeddiff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cppindex c683bf0a4..87c46c63a 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp@@ -7784,12 +7784,12 @@ void InGameUI::snapPlacementToGrid( Coord3D *world, const ThingTemplate *what, R//-------------------------------------------------------------------------------------------------/** Ctrl held while placing turns GridBuildPlacement the other way for as long as it is down: off,* it snaps; on, it places freely. The ghost, the lines and the order the click sends all ask- * this, so they cannot disagree. Classic keeps the option as the only switch, as it does with- * the shift and alt rows. */+ * this, so they cannot disagree. Classic too: the snap is not one of 1.04's rules, it is an+ * option on top of them, and the key that turns it is no different there. *///-------------------------------------------------------------------------------------------------Bool InGameUI::gridPlacementOn( void ) const{- const Bool flip = TheKeyboard && !TheGlobalData->isClassicUI() && TheKeyboard->isCtrl();+ const Bool flip = TheKeyboard && TheKeyboard->isCtrl();return ( TheGlobalData->m_gridBuildPlacement != FALSE ) != flip;}