File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments