fix: update self-kill logic in yearly report analyzer

This commit is contained in:
xkeyC 2025-12-17 20:15:54 +08:00
parent b62c603b01
commit c5f54e04b5

View File

@ -386,16 +386,19 @@ class YearlyReportAnalyzer {
stats._lastDeathTime != null && lineTime.difference(stats._lastDeathTime!).abs().inSeconds <= 2;
//
// selfKillCount
// deathCount + deathCount 退
if (victimId == killerId) {
if (victimId == stats.currentPlayerName) {
if (isRecent) {
// ()
// deathCount++退 selfKillCount
if (stats.deathCount > 0) stats.deathCount--;
// () deathCount
//
stats.selfKillCount++;
//
stats._lastDeathTime = lineTime;
} else {
// deathCount selfKillCount
stats.deathCount++;
stats.selfKillCount++;
stats._lastDeathTime = lineTime;
}