@@ -922,21 +922,8 @@ AsciiString GameInfoToAsciiString( const GameInfo *game )
922922 DEBUG_LOG ((" Map name is %s" , mapName.str ()));
923923 }
924924
925- UnsignedByte patchedClients = 0 ;
926- {
927- for (Int i = 0 ; i < MAX_SLOTS; ++i)
928- {
929- const GameSlot* slot = game->getConstSlot (i);
930- if (slot && slot->isHuman () && (i == game->getLocalSlotNum () || slot->getPatchVersion () >= 1337 ))
931- patchedClients |= (1 << i);
932- }
933- }
934-
935- AsciiString statsString;
936- statsString.format (" %d P%cP" , game->getUseStats () & 1 , patchedClients);
937-
938925 AsciiString optionsString;
939- optionsString.format (" US=%s ;M=%2.2x%s;MC=%X;MS=%d;SD=%d;C=%d;SR=%u;SC=%u;O=%c;" , statsString. str (), game->getMapContentsMask (), newMapName.str (),
926+ optionsString.format (" US=%d ;M=%2.2x%s;MC=%X;MS=%d;SD=%d;C=%d;SR=%u;SC=%u;O=%c;" , game-> getUseStats (), game->getMapContentsMask (), newMapName.str (),
940927 game->getMapCRC (), game->getMapSize (), game->getSeed (), game->getCRCInterval (), game->getSuperweaponRestriction (),
941928 game->getStartingCash ().countMoney (), game->oldFactionsOnly () ? ' Y' : ' N' );
942929
@@ -1031,7 +1018,6 @@ Bool ParseAsciiStringToGameInfo(GameInfo *game, AsciiString options)
10311018 Int useStats = TRUE ;
10321019 Money startingCash = TheGlobalData->m_defaultStartingCash ;
10331020 UnsignedShort restriction = 0 ; // Always the default
1034- UnsignedByte patchedClients = 0 ;
10351021
10361022 Bool sawMap, sawMapCRC, sawMapSize, sawSeed, sawSlotlist, sawUseStats, sawSuperweaponRestriction, sawStartingCash, sawOldFactions;
10371023 sawMap = sawMapCRC = sawMapSize = sawSeed = sawSlotlist = sawUseStats = sawSuperweaponRestriction = sawStartingCash = sawOldFactions = FALSE ;
@@ -1065,9 +1051,6 @@ Bool ParseAsciiStringToGameInfo(GameInfo *game, AsciiString options)
10651051 {
10661052 useStats = atoi (val.str ());
10671053 sawUseStats = true ;
1068-
1069- if (val.getLength () >= 5 && val.getCharAt (2 ) == ' P' && val.getCharAt (4 ) == ' P' )
1070- patchedClients = val.getCharAt (3 );
10711054 }
10721055 else
10731056 if (key.compare (" M" ) == 0 )
@@ -1498,8 +1481,8 @@ Bool ParseAsciiStringToGameInfo(GameInfo *game, AsciiString options)
14981481
14991482 for (Int i = 0 ; i<MAX_SLOTS; i++)
15001483 {
1501- if (patchedClients & ( 1 << i) )
1502- newSlot[i].setPatchVersion (1337 );
1484+ if (game-> getConstSlot (i)-> getState () == SLOT_PLAYER && newSlot[i]. getState () == SLOT_PLAYER )
1485+ newSlot[i].setPatchVersion (game-> getConstSlot (i)-> getPatchVersion () );
15031486
15041487 game->setSlot (i,newSlot[i]);
15051488 }
0 commit comments