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,10 @@ static void restartMissionMenu()
200200 Int gameMode = TheGameLogic->getGameMode ();
201201 AsciiString mapName = TheGlobalData->m_mapName ;
202202
203+ // TheSuperHackers @bugfix Caball009 07/02/2026 Reuse the previous seed value for the new skirmish match to prevent mismatches.
204+ // Campaign, challenge, and skirmish single-player scenarios all use GAME_SINGLE_PLAYER and are expected to use 0 as seed value.
205+ const UnsignedInt seed = (gameMode == GAME_SKIRMISH ) ? TheSkirmishGameInfo->getSeed () : 0 ;
206+
203207 //
204208 // if the map name was from a save game it will have "Save/" at the front of it,
205209 // we want to go back to the original pristine map string for the map name when restarting
@@ -238,11 +242,8 @@ static void restartMissionMenu()
238242 TheScriptEngine->getGlobalDifficulty (),
239243 rankPointsStartedWith)
240244 );
241- // if (TheGlobalData->m_fixedSeed >= 0)
242- // InitRandom(TheGlobalData->m_fixedSeed);
243- InitRandom (0 );
244- // else
245- // InitGameLogicRandom(GameClientRandomValue(0, INT_MAX - 1));
245+
246+ InitRandom (seed);
246247 }
247248 // TheTransitionHandler->remove("QuitFull"); //KRISMORNESS ADD
248249 // quitMenuLayout = nullptr; //KRISMORNESS ADD
You can’t perform that action at this time.
0 commit comments