File tree Expand file tree Collapse file tree
GeneralsMD/Code/GameEngine/Source/GameClient/GUI Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5353#include " GameClient/GameWindowTransitions.h"
5454#include " GameClient/DisconnectMenu.h"
5555#include " GameLogic/ScriptEngine.h"
56-
56+ # include " GameLogic/LogicRandomValue.h "
5757
5858
5959// PRIVATE DATA ///////////////////////////////////////////////////////////////////////////////////
@@ -244,7 +244,13 @@ static void restartMissionMenu()
244244 rankPointsStartedWith)
245245 );
246246
247- InitRandom (seed);
247+ // TheSuperHackers @bugfix ViTeXFTW 26/02/26 Generate a new a new seed value if we are in a singleplayer match
248+ // to avoid the same random events happening in the same order as previous match.
249+ if (gameMode == GAME_SINGLE_PLAYER) {
250+ InitRandom (GameLogicRandomValue (0 , INT_MAX - 1 ));
251+ } else {
252+ InitRandom (seed);
253+ }
248254 }
249255 // TheTransitionHandler->remove("QuitFull"); //KRISMORNESS ADD
250256 // quitMenuLayout = nullptr; //KRISMORNESS ADD
Original file line number Diff line number Diff line change @@ -542,7 +542,7 @@ void Shell::showShellMap(Bool useShellMap )
542542 TheGameLogic->exitGame ();
543543
544544 TheWritableGlobalData->m_pendingFile = TheGlobalData->m_shellMapName ;
545- InitGameLogicRandom (0 );
545+ InitGameLogicRandom (GameClientRandomValue ( 0 , INT_MAX - 1 ) );
546546 GameMessage *msg = TheMessageStream->appendMessage ( GameMessage::MSG_NEW_GAME );
547547 msg->appendIntegerArgument (GAME_SHELL);
548548 m_shellMapOn = TRUE ;
You can’t perform that action at this time.
0 commit comments