save player uuid in last game settings

This commit is contained in:
Mark Vejvoda 2013-06-05 20:31:54 +00:00
parent 09b6c1c1b1
commit 4da10fc7fa
1 changed files with 4 additions and 0 deletions

View File

@ -1012,6 +1012,8 @@ void CoreData::saveGameSettingsToFile(std::string fileName, GameSettings *gameSe
saveGameFile << "FactionStartLocationForIndex" << Shared::PlatformByteOrder::toCommonEndian(slotIndex) << "=" << Shared::PlatformByteOrder::toCommonEndian(gameSettings->getStartLocationIndex(i)) << std::endl;
saveGameFile << "FactionTypeNameForIndex" << Shared::PlatformByteOrder::toCommonEndian(slotIndex) << "=" << gameSettings->getFactionTypeName(i) << std::endl;
saveGameFile << "FactionPlayerNameForIndex" << Shared::PlatformByteOrder::toCommonEndian(slotIndex) << "=" << gameSettings->getNetworkPlayerName(i) << std::endl;
saveGameFile << "FactionPlayerUUIDForIndex" << Shared::PlatformByteOrder::toCommonEndian(slotIndex) << "=" << gameSettings->getNetworkPlayerUUID(i) << std::endl;
}
#if defined(WIN32) && !defined(__MINGW32__)
@ -1093,6 +1095,8 @@ bool CoreData::loadGameSettingsFromFile(std::string fileName, GameSettings *game
else {
gameSettings->setNetworkPlayerName(i,"");
}
gameSettings->setNetworkPlayerUUID(i,properties.getString(string("FactionPlayerUUIDForIndex") + intToStr(i),"") );
}
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s] Line: %d\n",__FILE__,__FUNCTION__,__LINE__);