From e3d9377c424bc188bf97c861fe798fb3a1fa8c13 Mon Sep 17 00:00:00 2001 From: Mathieu Schroeter Date: Mon, 19 Feb 2018 17:33:59 +0100 Subject: [PATCH] Do not count blupis that are dying / burning It fixes issue #53. --- src/decstat.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/decstat.cxx b/src/decstat.cxx index 639e362..80bb66a 100644 --- a/src/decstat.cxx +++ b/src/decstat.cxx @@ -644,8 +644,15 @@ CDecor::StatisticUpdate () Sint32 CDecor::StatisticGetBlupi () { + size_t rm = 0; + for (size_t i = 0; i < countof (m_blupi); ++i) + rm += (m_blupi[i].bExist && (m_blupi[i].action == ACTION_TCHAO || + m_blupi[i].action == ACTION_BURN)) + ? 1 + : 0; + return table_statistic[STATBLUPIf].nb + table_statistic[STATBLUPIm].nb + - table_statistic[STATBLUPI].nb; + table_statistic[STATBLUPI].nb + rm; } // Retourne le nombre de cellules en feu.