FSerialization::SyncPlots()
- Defined in
- CvPlot.cpp, line 66
- Hook name
CivHooks::FSerialization_SyncPlots
Hooks
static bool BeforeFSerialization_SyncPlots();static void AfterFSerialization_SyncPlots();static void ReplaceFSerialization_SyncPlots(void (*original)());CivRegisterBefore<CivHooks::FSerialization_SyncPlots>(host, &BeforeFSerialization_SyncPlots);CivRegisterAfter<CivHooks::FSerialization_SyncPlots>(host, &AfterFSerialization_SyncPlots);CivRegisterReplace<CivHooks::FSerialization_SyncPlots>(host, &ReplaceFSerialization_SyncPlots);
Code
66void SyncPlots()67{68 if(GC.getGame().isNetworkMultiPlayer())69 {70 PlayerTypes authoritativePlayer = GC.getGame().getActivePlayer();71 std::set<CvPlot*>::const_iterator i;72 for(i = plotsToCheck.begin(); i != plotsToCheck.end(); ++i)73 {74 const CvPlot* plot = *i;7576 if(plot)77 {78 const FAutoArchive& archive = plot->getSyncArchive();79 if(archive.hasDeltas())80 {81 FMemoryStream memoryStream;82 std::vector<std::pair<std::string, std::string> > callStacks;83 archive.saveDelta(memoryStream, callStacks);84 gDLL->sendPlotSyncCheck(authoritativePlayer, plot->getX(), plot->getY(), memoryStream, callStacks);85 }86 }87 }88 }89}
Calls
- CvGame::getActivePlayer() const
- CvGame::isNetworkMultiPlayer() const
- CvGlobals::getDLLIFace()
- CvGlobals::getGame()
- CvPlot::getSyncArchive() const
- CvPlot::getX() const
- CvPlot::getY() const
FAutoArchive::hasDeltasFAutoArchive::saveDeltaFMemoryStream::FMemoryStreamICvEngineUtility1::sendPlotSyncCheckstd::_Tree::beginstd::_Tree::const_iterator::const_iteratorstd::_Tree::const_iterator::operator!=std::_Tree::const_iterator::operator*std::_Tree::const_iterator::operator++std::_Tree::const_iterator::operator=std::_Tree::endstd::vector::vector