diff --git a/source/blood/src/sbar.cpp b/source/blood/src/sbar.cpp index bcb712d24..70770c1f5 100644 --- a/source/blood/src/sbar.cpp +++ b/source/blood/src/sbar.cpp @@ -252,8 +252,9 @@ private: stats.kills = gKillMgr.Kills; stats.maxkills = gKillMgr.TotalKills; stats.frags = gGameOptions.nGameType == 3? pPlayer->fragCount : -1; - stats.secrets = gSecretMgr.Founds + gSecretMgr.Super; - stats.maxsecrets = gSecretMgr.Total; + stats.secrets = gSecretMgr.Founds; + stats.supersecrets = gSecretMgr.Super; + stats.maxsecrets = max(gSecretMgr.Founds, gSecretMgr.Total); // If we found more than there are, increase the total. Some levels have a bugged counter. DBaseStatusBar::PrintLevelStats(stats); } diff --git a/source/core/statusbar.h b/source/core/statusbar.h index 846751204..3edeb862e 100644 --- a/source/core/statusbar.h +++ b/source/core/statusbar.h @@ -76,7 +76,7 @@ struct FLevelStats int time; // in milliseconds int frags; int kills, maxkills; // set maxkills to -1 to ignore, or to -2 to only print kills - int secrets, maxsecrets; // set maxsecrets to -1 to ignore + int secrets, maxsecrets, supersecrets; // set maxsecrets to -1 to ignore int spacing; // uses fontheight if 0 or less. EColorRange letterColor, standardColor, completeColor; double fontscale; diff --git a/source/core/statusbar2.cpp b/source/core/statusbar2.cpp index 5d4ace4e2..4979af83b 100644 --- a/source/core/statusbar2.cpp +++ b/source/core/statusbar2.cpp @@ -192,8 +192,13 @@ void DBaseStatusBar::PrintLevelStats(FLevelStats &stats) if (stats.maxsecrets > 0) // don't bother if there are no secrets. { - text.Format(TEXTCOLOR_ESCAPESTR "%cS: " TEXTCOLOR_ESCAPESTR "%c%d/%d", - stats.letterColor + 'A', stats.secrets == stats.maxsecrets ? stats.completeColor + 'A' : stats.standardColor + 'A', stats.secrets, stats.maxsecrets); + if (stats.supersecrets <= 0) + text.Format(TEXTCOLOR_ESCAPESTR "%cS: " TEXTCOLOR_ESCAPESTR "%c%d/%d", + stats.letterColor + 'A', stats.secrets >= stats.maxsecrets ? stats.completeColor + 'A' : stats.standardColor + 'A', stats.secrets, stats.maxsecrets); + else + text.Format(TEXTCOLOR_ESCAPESTR "%cS: " TEXTCOLOR_ESCAPESTR "%c%d/%d+%d", + stats.letterColor + 'A', stats.secrets >= stats.maxsecrets ? stats.completeColor + 'A' : stats.standardColor + 'A', stats.secrets, stats.maxsecrets, stats.supersecrets); + DrawText(twod, stats.font, CR_UNTRANSLATED, 2 * hud_statscale + scale, y1 + scale, text, DTA_FullscreenScale, FSMode_ScaleToHeight, DTA_VirtualWidth, 320, DTA_VirtualHeight, 200, DTA_KeepRatio, true, DTA_ScaleX, scale, DTA_ScaleY, scale, DTA_LegacyRenderStyle, STYLE_TranslucentStencil, DTA_Color, black, TAG_DONE);