From bf092f121f8e725719b7085b5f63a66f2baeed8c Mon Sep 17 00:00:00 2001 From: JoKeRZH429 <83122870+JoKeRZH429@users.noreply.github.com> Date: Tue, 8 Sep 2026 23:08:29 +0500 Subject: [PATCH] feat: report in-game simulation duration in match outcome --- .../GeneralsOnline/OnlineServices_StatsInterface.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/GeneralsMD/Code/GameEngine/Source/GameNetwork/GeneralsOnline/OnlineServices_StatsInterface.cpp b/GeneralsMD/Code/GameEngine/Source/GameNetwork/GeneralsOnline/OnlineServices_StatsInterface.cpp index 50c3363ffef..00b5e4011ad 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameNetwork/GeneralsOnline/OnlineServices_StatsInterface.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameNetwork/GeneralsOnline/OnlineServices_StatsInterface.cpp @@ -7,6 +7,7 @@ #include "../HTTP/HTTPManager.h" #include "Common/PlayerTemplate.h" +#include "GameLogic/GameLogic.h" #include "GameNetwork/GameSpy/LadderDefs.h" #include @@ -584,6 +585,7 @@ void NGMP_OnlineServices_StatsInterface::CommitMyOutcome(ScoreKeeper* pScoreKeep } const bool desynced = TheNetwork->sawCRCMismatch(); + const uint32_t duration = TheGameLogic->getFrame() / LOGICFRAMES_PER_SECOND; nlohmann::json j; j["buildings_built"] = buildingsBuilt; @@ -597,6 +599,7 @@ void NGMP_OnlineServices_StatsInterface::CommitMyOutcome(ScoreKeeper* pScoreKeep j["match_id"] = currentMatchID; j["side"] = resolvedSide; j["desynced"] = desynced; + j["duration"] = duration; std::string strPostData = j.dump();