Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();

Expand Down
Loading