Skip to content

Commit 2068471

Browse files
committed
Applied feedback.
1 parent 9fd3a55 commit 2068471

2 files changed

Lines changed: 8 additions & 16 deletions

File tree

  • GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus
  • Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus

Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/QuitMenu.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,9 @@ static void restartMissionMenu()
200200
Int gameMode = TheGameLogic->getGameMode();
201201
AsciiString mapName = TheGlobalData->m_mapName;
202202

203+
// TheSuperHackers @bugfix Caball009 07/02/2026 Re-use the previous seed value instead of 0 for the new skirmish match to avoid mismatches.
204+
const UnsignedInt seed = (gameMode == GAME_SKIRMISH) ? TheGameInfo->getSeed() : 0;
205+
203206
//
204207
// if the map name was from a save game it will have "Save/" at the front of it,
205208
// we want to go back to the original pristine map string for the map name when restarting
@@ -238,14 +241,7 @@ static void restartMissionMenu()
238241
TheScriptEngine->getGlobalDifficulty(),
239242
rankPointsStartedWith)
240243
);
241-
//if (TheGlobalData->m_fixedSeed >= 0)
242-
//InitRandom(TheGlobalData->m_fixedSeed);
243-
//InitRandom(0);
244-
//else
245-
// InitGameLogicRandom(GameClientRandomValue(0, INT_MAX - 1));
246-
247-
// TheSuperHackers @bugfix Caball009 07/02/2026 Re-use the previous seed value instead of 0 for the new skirmish match to avoid mismatches.
248-
const UnsignedInt seed = (gameMode == GAME_SKIRMISH) ? TheGameInfo->getSeed() : 0;
244+
249245
InitRandom(seed);
250246
}
251247
//TheTransitionHandler->remove("QuitFull"); //KRISMORNESS ADD

GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/QuitMenu.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,9 @@ static void restartMissionMenu()
200200
Int gameMode = TheGameLogic->getGameMode();
201201
AsciiString mapName = TheGlobalData->m_mapName;
202202

203+
// TheSuperHackers @bugfix Caball009 07/02/2026 Re-use the previous seed value instead of 0 for the new skirmish match to avoid mismatches.
204+
const UnsignedInt seed = (gameMode == GAME_SKIRMISH) ? TheGameInfo->getSeed() : 0;
205+
203206
//
204207
// if the map name was from a save game it will have "Save/" at the front of it,
205208
// we want to go back to the original pristine map string for the map name when restarting
@@ -238,14 +241,7 @@ static void restartMissionMenu()
238241
TheScriptEngine->getGlobalDifficulty(),
239242
rankPointsStartedWith)
240243
);
241-
//if (TheGlobalData->m_fixedSeed >= 0)
242-
//InitRandom(TheGlobalData->m_fixedSeed);
243-
//InitRandom(0);
244-
//else
245-
// InitGameLogicRandom(GameClientRandomValue(0, INT_MAX - 1));
246-
247-
// TheSuperHackers @bugfix Caball009 07/02/2026 Re-use the previous seed value instead of 0 for the new skirmish match to avoid mismatches.
248-
const UnsignedInt seed = (gameMode == GAME_SKIRMISH) ? TheGameInfo->getSeed() : 0;
244+
249245
InitRandom(seed);
250246
}
251247
//TheTransitionHandler->remove("QuitFull"); //KRISMORNESS ADD

0 commit comments

Comments
 (0)