diff --git a/GeneralsMD/Code/GameEngine/Source/GameNetwork/GeneralsOnline/OnlineServices_StatsInterface.cpp b/GeneralsMD/Code/GameEngine/Source/GameNetwork/GeneralsOnline/OnlineServices_StatsInterface.cpp index 6aee04b3b22..b64c5ca6745 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameNetwork/GeneralsOnline/OnlineServices_StatsInterface.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameNetwork/GeneralsOnline/OnlineServices_StatsInterface.cpp @@ -437,6 +437,18 @@ void NGMP_OnlineServices_StatsInterface::CommitMyOutcome(ScoreKeeper* pScoreKeep uint64_t currentMatchID = pLobbyInterface->GetCurrentMatchID(); + int resolvedSide = -1; + NGMPGame* myGame = pLobbyInterface->GetCurrentGame(); + + if (myGame != nullptr) + { + GameSlot* pLocalSlot = myGame->getSlot(myGame->getLocalSlotNum()); + if (pLocalSlot != nullptr) + { + resolvedSide = pLocalSlot->getPlayerTemplate(); + } + } + nlohmann::json j; j["buildings_built"] = buildingsBuilt; j["buildings_killed"] = buildingsDestroyed; @@ -447,6 +459,7 @@ void NGMP_OnlineServices_StatsInterface::CommitMyOutcome(ScoreKeeper* pScoreKeep j["total_money"] = totalMoney; j["won"] = bWon; j["match_id"] = currentMatchID; + j["side"] = resolvedSide; std::string strPostData = j.dump();