From a853682980e31702db6ce5d786bd4b1e07ef7d7c Mon Sep 17 00:00:00 2001 From: janzert Date: Tue, 14 Nov 2017 01:01:34 -0500 Subject: [PATCH] Record all player stats in replay file. --- environment/core/Statistics.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/environment/core/Statistics.cpp b/environment/core/Statistics.cpp index b4989f76..dd61be19 100644 --- a/environment/core/Statistics.cpp +++ b/environment/core/Statistics.cpp @@ -6,6 +6,11 @@ auto to_json(nlohmann::json& json, const GameStatistics& stats) -> void { auto& player_stats = stats.player_statistics[player_id]; json[std::to_string(static_cast(player_id))] = nlohmann::json{ { "rank", player_stats.rank }, + { "last_frame_alive", player_stats.last_frame_alive }, + { "total_ship_count", player_stats.total_ship_count }, + { "damage_dealt", player_stats.damage_dealt }, + { "init_response_time", player_stats.init_response_time }, + { "average_frame_response_time", player_stats.average_frame_response_time }, }; } }