diff --git a/source/glest_game/game/game.cpp b/source/glest_game/game/game.cpp index c9cd8d52..c8d65ca1 100644 --- a/source/glest_game/game/game.cpp +++ b/source/glest_game/game/game.cpp @@ -5177,6 +5177,7 @@ void saveStatsToSteam(Game* game, Stats& endStats) { if (steamInstance != NULL) { printf("\nSTEAM detected, writing out end game stats for player!\n"); + // Write out stats here if (NetworkManager::getInstance().isNetworkGame()) { //printf("\nSTEAM Refresh Stats!\n"); steamInstance->requestRefreshStats(); @@ -5228,6 +5229,7 @@ void saveStatsToSteam(Game* game, Stats& endStats) { } } + // Write out achievements here for (int factionIndex = 0; factionIndex < game->getWorld()->getFactionCount(); ++factionIndex) { if (factionIndex == game->getWorld()->getThisFactionIndex()) { @@ -5236,6 +5238,11 @@ void saveStatsToSteam(Game* game, Stats& endStats) { if(steamInstance->isUnlocked(EnumParser::getString(ACH_WIN_ONE_GAME).c_str()) == false) { steamInstance->unlock(EnumParser::getString(ACH_WIN_ONE_GAME).c_str()); } + if (NetworkManager::getInstance().isNetworkGame()) { + if(steamInstance->isUnlocked(EnumParser::getString(ACH_WIN_ONE_GAME_ONLINE).c_str()) == false) { + steamInstance->unlock(EnumParser::getString(ACH_WIN_ONE_GAME_ONLINE).c_str()); + } + } } } } diff --git a/source/glest_game/steam/steam.h b/source/glest_game/steam/steam.h index 20ff06db..b6eecb34 100644 --- a/source/glest_game/steam/steam.h +++ b/source/glest_game/steam/steam.h @@ -41,12 +41,14 @@ inline EnumParser::EnumParser() { } enum SteamAchievementName { - ACH_WIN_ONE_GAME + ACH_WIN_ONE_GAME, + ACH_WIN_ONE_GAME_ONLINE }; template <> inline EnumParser::EnumParser() { - enumMap["ACH_WIN_ONE_GAME"] = ACH_WIN_ONE_GAME; + enumMap["ACH_WIN_ONE_GAME"] = ACH_WIN_ONE_GAME; + enumMap["ACH_WIN_ONE_GAME_ONLINE"] = ACH_WIN_ONE_GAME_ONLINE; } class Steam