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): let the retaliation switch through a cinematic
Olcay Seygan46b11797cb06
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex c0ae18c7d..23d4c5059 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -1738,6 +1738,7 @@ The whole HUD is on the hardware. Four colours carry it, and they mean the same- Closing a laptop's lid, or pulling out the drive the game is installed on, ends the game with a box saying its data is gone. The next read from the missing drive used to crash it.- A custom map that defines its own way for a vehicle to move no longer crashes the game with "Pure virtual function called" when the match ends. The game freed that map's movement rules and then kept reading the freed record. The shipped Hovercraft test map did it every time, and so could any map handed to you in a lobby.- Leaving a match from the menu no longer ends in a "Game crash: Pure virtual function called" box. Since v3.1.0 anything that died in the last instant before you left was thrown away twice as the game cleared the battlefield, which in testing was every exit from a running skirmish, and the box closed the game with an error instead of returning you to the menu.+- Retaliation works from the first second of a campaign mission. The option reaches the battle as a message, and while a mission's opening cinematic held the controls the game threw that message away along with your clicks, so a unit hit during the cinematic did not call the friends around it to strike back. Whether one copy slipped through before the cinematic started came down to how busy the PC was, and that alone made USA mission one play out two different ways on the same machine: 2 runs in 10 ended differently.- A missing save folder no longer costs you maps. The game listed the folder it runs from instead, and the tidy-up after a match deleted the .map files it found there.- Screenshots come out straight at any width. At 1366 wide each row slid sideways, and at any width that does not divide by eight the game read past the end of the picture.- Quitting the Windows game under Proton, the way a Steam Deck used to run it, no longer crashes on the way out.diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cppindex e0b1fc172..e80ee18ff 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp@@ -5804,6 +5804,11 @@ static Bool isSystemMessage( const GameMessage *msg )case GameMessage::MSG_LOGIC_CRC:case GameMessage::MSG_SET_REPLAY_CAMERA:case GameMessage::MSG_FRAME_TICK:+ /* A preference the logic itself posts once a second (Player::update), not an order. Destroyed+ while a cinematic held input off, it got through or not on whether a client pass ran between+ the post and the script that disabled input, which is the machine's load: USA mission one read+ a different CRC in 2 of 10 runs, an AIGroup id short from the dispatch it never reached. */+ case GameMessage::MSG_ENABLE_RETALIATION_MODE:return TRUE;}return FALSE;diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cppindex a172eff9e..d565228fc 100644--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp@@ -558,7 +558,11 @@ void GameLogic::logicMessageDispatcher( GameMessage *msg, AIGroup *orderedGroup{if (msg->getType() >= GameMessage::MSG_BEGIN_NETWORK_MESSAGES && msg->getType() <= GameMessage::MSG_END_NETWORK_MESSAGES){- if (msg->getType() != GameMessage::MSG_LOGIC_CRC && msg->getType() != GameMessage::MSG_SET_REPLAY_CAMERA)+ /* The retaliation switch is no order and needs no selection, and its group took an AIGroup id+ on whatever frame the message arrived. Logic posts it, and in a solo game it waits for the+ next client pass, so that frame is the machine's load and the ids after it moved with it. */+ if (msg->getType() != GameMessage::MSG_LOGIC_CRC && msg->getType() != GameMessage::MSG_SET_REPLAY_CAMERA+ && msg->getType() != GameMessage::MSG_ENABLE_RETALIATION_MODE){currentlySelectedGroup = TheAI->createGroup(); // can't do this outside a game - it'll cause sync errors galore.CRCGEN_LOG(( "Creating AIGroup %d in GameLogic::logicMessageDispatcher()\n", (currentlySelectedGroup)?currentlySelectedGroup->getID():0 ));