From d4cbcab1cbac9fd9a7389ad7bc020ad5cd10c113 Mon Sep 17 00:00:00 2001 From: Antonio Martinez Date: Mon, 25 Aug 2025 15:27:02 -0400 Subject: [PATCH] Platinum breakdown by author --- src/p_setup.cpp | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/src/p_setup.cpp b/src/p_setup.cpp index 43da65825..640e91a6b 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -9558,7 +9558,50 @@ void Command_Platinums(void) for (const auto& pair : frequency) { - CONS_Printf("%s: %d\n", pair.first.c_str(), pair.second); + CONS_Printf("%s: %d - ", pair.first.c_str(), pair.second); + + for (INT32 j = 0; j < nummapheaders; j++) + { + mapheader_t *map = mapheaderinfo[j]; + + if (map == NULL || map->ghostCount < 1) + continue; + + // Gather staff ghost times + srb2::Vector stafftimes; + for (int i = 0; i < map->ghostCount; i++) + { + tic_t time = map->ghostBrief[i]->time; + if (time <= 0) + { + continue; + } + + stafftimes.push_back(map->ghostBrief[i]->time); + } + + if (stafftimes.empty()) + { + continue; + } + + std::sort(stafftimes.begin(), stafftimes.end()); + + for (int i = 0; i < map->ghostCount; i++) + { + if (strcmp(pair.first.c_str(), map->ghostBrief[i]->name)) + break; + + tic_t time = map->ghostBrief[i]->time; + if (time == stafftimes.at(0)) + { + CONS_Printf("%s, ", map->lumpname); + break; + } + } + } + + CONS_Printf("\n"); } }