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): skirmish room no longer crashes on its way out
Olcay Seygan51c12d098947
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex e3aa413a8..4551a8d95 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -24,6 +24,7 @@ found and fixed, EA's own, not port damage.**- The player count starts at the number of seats already taken in the room. The tab, the map type and the size you used last are remembered for the next time.- In a LAN or online room the other players do not download anything: the map's name carries its recipe, and their own game builds the same map from it and checks it against yours. A room that records stats keeps to the official list.- Random maps used to be reachable only by a hidden command-line switch that added five rows to the skirmish list.+- Leaving the skirmish room for the main menu no longer crashes the game. In 3.4.0 it did every time, whatever map was picked: the room went on refitting its random map to the seats for a moment after Back had already thrown the seats away.## An army screen in every lobbydiff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/SkirmishGameOptionsMenu.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/SkirmishGameOptionsMenu.cppindex 4f8df64df..f5585d599 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/SkirmishGameOptionsMenu.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/SkirmishGameOptionsMenu.cpp@@ -1723,7 +1723,8 @@ void SkirmishGameOptionsMenuUpdate( WindowLayout * layout, void *userData)stillNeedsToSetOptions = FALSE;}- if (FitRandomMapToRoom(TheSkirmishGameInfo))+ // Back deletes the room's game at once, and the screen goes on updating while it animates out+ if (TheSkirmishGameInfo && FitRandomMapToRoom(TheSkirmishGameInfo)){skirmishPositionStartSpots();skirmishUpdateSlotList();diff --git a/GeneralsMD/Code/GameEngine/Source/GameNetwork/GUIUtil.cpp b/GeneralsMD/Code/GameEngine/Source/GameNetwork/GUIUtil.cppindex 63ecd57c3..514981899 100644--- a/GeneralsMD/Code/GameEngine/Source/GameNetwork/GUIUtil.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameNetwork/GUIUtil.cpp@@ -1365,6 +1365,9 @@ Bool FitRandomMapToRoom(GameInfo *game)map.toLower();TheMapCache->updateCache();const MapMetaData *md = TheMapCache->findMap(map);+ // a template that built nothing leaves no map under the new name; the room keeps the one it has+ if (md == NULL)+ return FALSE;game->setMap(map);game->setMapCRC(md->m_CRC);game->setMapSize(md->m_filesize);