diff --git a/src/g_game.c b/src/g_game.c index dfc57ddfb..48a0fc05d 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -482,9 +482,9 @@ bademblem: else stickermedalinfo.timetoreach = mapheaderinfo[map]->ghostBrief[emblem->tag-1]->time; } - else if (emblem->tag < 0 && emblem->tag >= -4) + else if (emblem->tag < 0 && emblem->tag > AUTOMEDAL_MAX) { - // Use auto medal times for emblem tags from -4 to -1 + // Use auto medal times for emblem tags, see AUTOMEDAL_ in m_cond.h int index = -emblem->tag - 1; // 0 is Platinum, 3 is Bronze stickermedalinfo.timetoreach = mapheaderinfo[map]->automedaltime[index]; } diff --git a/src/m_cond.c b/src/m_cond.c index c37a43ea6..3c7c958b1 100644 --- a/src/m_cond.c +++ b/src/m_cond.c @@ -3160,9 +3160,9 @@ UINT16 M_CheckLevelEmblems(void) res = (G_GetBestTime(levelnum) <= mapheaderinfo[checkLevel]->ghostBrief[tag-1]->time); } - else if (tag < 0 && tag >= -4) + else if (tag < 0 && tag > AUTOMEDAL_MAX) { - // Use auto medal times for emblem tags from -4 to -1 + // Use auto medal times for emblem tags, see AUTOMEDAL_ in m_cond.h int index = -tag - 1; // 0 is Platinum, 3 is Bronze tic_t time = mapheaderinfo[checkLevel]->automedaltime[index]; diff --git a/src/m_cond.h b/src/m_cond.h index 95d0ef934..989be15d0 100644 --- a/src/m_cond.h +++ b/src/m_cond.h @@ -186,6 +186,7 @@ struct conditionset_t #define ME_SPBATTACK 2 // Achieve in SPB Attack // Automedal SOC tags +#define AUTOMEDAL_MAX -5 // just in case any more are ever added #define AUTOMEDAL_BRONZE -4 #define AUTOMEDAL_SILVER -3 #define AUTOMEDAL_GOLD -2