Index: source/simulation2/components/CCmpAIManager.cpp =================================================================== --- source/simulation2/components/CCmpAIManager.cpp +++ source/simulation2/components/CCmpAIManager.cpp @@ -745,7 +745,6 @@ std::stringstream rngStream; deserializer.StringASCII("rng", rngString, 0, 32); rngStream << rngString; - rngStream >> m_RNG; deserializer.NumberU32_Unbounded("turn", m_TurnNum); @@ -819,6 +818,9 @@ deserializer.RawBytes("pathfinder grid data", (u8*)m_PassabilityMap.m_Data, mapW*mapH*sizeof(NavcellData)); m_LongPathfinder.Reload(&m_PassabilityMap); m_HierarchicalPathfinder.Recompute(&m_PassabilityMap, m_NonPathfindingPassClasses, m_PathfindingPassClasses); + + // Keep it last so it is not affected by calling random functions + rngStream >> m_RNG; } int getPlayerSize()