mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
Minor fixes to multiplayer load game support
This commit is contained in:
@@ -399,8 +399,6 @@ void CClient::loadGame(const std::string & fname, const bool server, const std::
|
|||||||
logNetwork->infoStream() << "Server opened savegame properly.";
|
logNetwork->infoStream() << "Server opened savegame properly.";
|
||||||
}
|
}
|
||||||
|
|
||||||
player = PlayerColor(player_);
|
|
||||||
|
|
||||||
if(server)
|
if(server)
|
||||||
{
|
{
|
||||||
for(auto & elem : gs->scenarioOps->playerInfos)
|
for(auto & elem : gs->scenarioOps->playerInfos)
|
||||||
@@ -709,12 +707,13 @@ void CClient::serialize( Handler &h, const int version, const std::set<PlayerCol
|
|||||||
nInt->playerID = pid;
|
nInt->playerID = pid;
|
||||||
|
|
||||||
if(playerIDs.count(pid))
|
if(playerIDs.count(pid))
|
||||||
installNewPlayerInterface(nInt, pid);
|
installNewPlayerInterface(nInt, pid);
|
||||||
nInt->loadGame(dynamic_cast<CISer<CLoadFile>&>(h), version); //another evil cast, check above
|
|
||||||
|
nInt->loadGame(dynamic_cast<CISer<CLoadFile>&>(h), version); //another evil cast, check above
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!vstd::contains(battleints, PlayerColor::NEUTRAL))
|
/* if(!vstd::contains(battleints, PlayerColor::NEUTRAL))
|
||||||
loadNeutralBattleAI();
|
loadNeutralBattleAI();*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user