@@ -888,7 +888,8 @@ Bool GameInfo::isSandbox()
888888
889889static const char slotListID = ' S' ;
890890
891- AsciiString GameInfoToAsciiString ( const GameInfo *game )
891+ // TheSuperHackers @info arcticdolphin 02/03/2026 Added includeSeed parameter.
892+ AsciiString GameInfoToAsciiString ( const GameInfo *game, bool includeSeed )
892893{
893894 if (!game)
894895 return AsciiString::TheEmptyString;
@@ -918,6 +919,25 @@ AsciiString GameInfoToAsciiString( const GameInfo *game )
918919 }
919920
920921 AsciiString optionsString;
922+ #if RETAIL_COMPATIBLE_NETWORKING
923+ // TheSuperHackers @info arcticdolphin 02/03/2026 includeSeed is unused in retail builds; seed is always included.
924+ (void )includeSeed;
925+ #else
926+ // TheSuperHackers @info arcticdolphin 02/03/2026 SD= excluded when includeSeed=false.
927+ if (!includeSeed)
928+ {
929+ #if RTS_GENERALS
930+ optionsString.format (" M=%2.2x%s;MC=%X;MS=%d;C=%d;" , game->getMapContentsMask (), newMapName.str (),
931+ game->getMapCRC (), game->getMapSize (), game->getCRCInterval ());
932+ #else
933+ optionsString.format (" US=%d;M=%2.2x%s;MC=%X;MS=%d;C=%d;SR=%u;SC=%u;O=%c;" , game->getUseStats (), game->getMapContentsMask (), newMapName.str (),
934+ game->getMapCRC (), game->getMapSize (), game->getCRCInterval (), game->getSuperweaponRestriction (),
935+ game->getStartingCash ().countMoney (), game->oldFactionsOnly () ? ' Y' : ' N' );
936+ #endif
937+ }
938+ else
939+ #endif
940+ {
921941#if RTS_GENERALS
922942 optionsString.format (" M=%2.2x%s;MC=%X;MS=%d;SD=%d;C=%d;" , game->getMapContentsMask (), newMapName.str (),
923943 game->getMapCRC (), game->getMapSize (), game->getSeed (), game->getCRCInterval ());
@@ -926,6 +946,7 @@ AsciiString GameInfoToAsciiString( const GameInfo *game )
926946 game->getMapCRC (), game->getMapSize (), game->getSeed (), game->getCRCInterval (), game->getSuperweaponRestriction (),
927947 game->getStartingCash ().countMoney (), game->oldFactionsOnly () ? ' Y' : ' N' );
928948#endif
949+ }
929950
930951 // add player info for each slot
931952 optionsString.concat (slotListID);
@@ -1000,8 +1021,14 @@ static Int grabHexInt(const char *s)
10001021 Int b = strtol (tmp, nullptr , 16 );
10011022 return b;
10021023}
1003- Bool ParseAsciiStringToGameInfo (GameInfo *game, AsciiString options)
1024+
1025+ // TheSuperHackers @info arcticdolphin 02/03/2026 Added requireSeed parameter.
1026+ Bool ParseAsciiStringToGameInfo (GameInfo *game, AsciiString options, bool requireSeed)
10041027{
1028+ #if RETAIL_COMPATIBLE_NETWORKING
1029+ // TheSuperHackers @info arcticdolphin 02/03/2026 requireSeed is unused in retail builds; seed is always required.
1030+ (void )requireSeed;
1031+ #endif
10051032 // Parse game options
10061033 char *buf = strdup (options.str ());
10071034 char *bufPtr = buf;
@@ -1482,7 +1509,12 @@ Bool ParseAsciiStringToGameInfo(GameInfo *game, AsciiString options)
14821509 // * StartingCash
14831510 // * OldFactionsOnly
14841511 // In Generals they never were.
1512+ #if !RETAIL_COMPATIBLE_NETWORKING
1513+ // TheSuperHackers @info arcticdolphin 02/03/2026 SD= may be absent when requireSeed=false.
1514+ if (optionsOk && sawMap && sawMapCRC && sawMapSize && (!requireSeed || sawSeed) && sawSlotlist && sawCRC)
1515+ #else
14851516 if (optionsOk && sawMap && sawMapCRC && sawMapSize && sawSeed && sawSlotlist && sawCRC)
1517+ #endif
14861518 {
14871519 // We were setting the Global Data directly here, but Instead, I'm now
14881520 // first setting the data in game. We'll set the global data when
@@ -1499,7 +1531,19 @@ Bool ParseAsciiStringToGameInfo(GameInfo *game, AsciiString options)
14991531 game->setMapCRC (mapCRC);
15001532 game->setMapSize (mapSize);
15011533 game->setMapContentsMask (mapContentsMask);
1502- game->setSeed (seed);
1534+ // TheSuperHackers @info arcticdolphin 02/03/2026 Only apply seed when SD= was present.
1535+ if (sawSeed)
1536+ {
1537+ game->setSeed (seed);
1538+ }
1539+ #if !RETAIL_COMPATIBLE_NETWORKING
1540+ else
1541+ {
1542+ // SD= was omitted (non-retail commit-reveal path): clear any stale seed so the
1543+ // GameInfo cannot carry a value from a previous parse until the protocol finalizes it.
1544+ game->setSeed (0 );
1545+ }
1546+ #endif
15031547 game->setCRCInterval (crc);
15041548 game->setUseStats (useStats);
15051549 game->setSuperweaponRestriction (restriction);
0 commit comments