diff --git a/src/deh_soc.c b/src/deh_soc.c index a23ba330b..c96bbbaac 100644 --- a/src/deh_soc.c +++ b/src/deh_soc.c @@ -2763,7 +2763,7 @@ static void readcondition(UINT8 set, UINT32 id, char *word2) } else if (fastcmp(params[0], "TRIGGER")) { - PARAMCHECK(2); // strictly speaking at LEAST two + PARAMCHECK(1); ty = UCRP_TRIGGER; re = atoi(params[1]); @@ -2791,9 +2791,9 @@ static void readcondition(UINT8 set, UINT32 id, char *word2) *spos = ' '; spos = params[--i]; } -#endif stringvar = Z_StrDup(params[2]); +#endif } else if ((offset=0) || fastcmp(params[0], "FALLOFF") || (++offset && fastcmp(params[0], "TOUCHOFFROAD")) diff --git a/src/g_game.c b/src/g_game.c index b96e49283..9e6b2cb72 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -3202,6 +3202,17 @@ void G_ExitLevel(void) UINT8 i; boolean doretry = false; + if (grandprixinfo.gp == true) + { + for (i = 0; i < MAXPLAYERS; i++) + { + if (playeringame[i] && !players[i].spectator) + { + K_PlayerFinishGrandPrix(&players[i]); + } + } + } + if (!G_GametypeUsesLives()) ; // never force a retry else if (specialstageinfo.valid == true || (gametyperules & GTR_BOSS)) @@ -3221,14 +3232,6 @@ void G_ExitLevel(void) } else if (grandprixinfo.gp == true && grandprixinfo.eventmode == GPEVENT_NONE) { - for (i = 0; i < MAXPLAYERS; i++) - { - if (playeringame[i] && !players[i].spectator) - { - K_PlayerFinishGrandPrix(&players[i]); - } - } - doretry = (grandprixinfo.wonround != true); } diff --git a/src/k_menudraw.c b/src/k_menudraw.c index 175422662..3ef4eeefd 100644 --- a/src/k_menudraw.c +++ b/src/k_menudraw.c @@ -2242,9 +2242,21 @@ void M_DrawCupSelect(void) else { UINT16 col = SKINCOLOR_CHAOSEMERALD1 + (templevelsearch.cup->emeraldnum-1) % 7; + patch_t *em; + colormap = R_GetTranslationColormap(TC_DEFAULT, col, GTC_MENUCACHE); - V_DrawFixedPatch((x + 26 - rankx)*FRACUNIT, (y + icony + 13)*FRACUNIT, FRACUNIT, 0, W_CachePatchName("K_EMERC", PU_CACHE), colormap); + if (templevelsearch.cup->emeraldnum > 7) + { + em = W_CachePatchName("K_SUPER1", PU_CACHE); + rankx += 2; + } + else + { + em = W_CachePatchName("K_EMERC", PU_CACHE); + } + + V_DrawFixedPatch((x + 26 - rankx)*FRACUNIT, (y + icony + 13)*FRACUNIT, FRACUNIT, 0, em, colormap); } } } diff --git a/src/m_cond.c b/src/m_cond.c index 9fc0d0805..5c7016c7a 100644 --- a/src/m_cond.c +++ b/src/m_cond.c @@ -1268,7 +1268,10 @@ static const char *M_GetConditionString(condition_t *cn) case UCRP_ISCHARACTER: if (cn->requirement < 0 || !skins[cn->requirement].realname[0]) return va("INVALID CHAR CONDITION \"%d:%d\"", cn->type, cn->requirement); - return va("as %s", skins[cn->requirement].realname); + work = (R_SkinUsable(-1, cn->requirement, false)) + ? skins[cn->requirement].realname + : "???"; + return va("as %s", work); case UCRP_ISENGINECLASS: return va("with engine class %c", 'A' + cn->requirement); case UCRP_ISDIFFICULTY: @@ -1374,7 +1377,7 @@ static const char *M_GetConditionString(condition_t *cn) G_TicsToCentiseconds(cn->requirement)); case UCRP_TRIGGER: - return cn->stringvar; + return "do something special"; case UCRP_FALLOFF: return (cn->requirement == 1) ? "fall off the course" : "without falling off"; diff --git a/src/menus/extras-challenges.c b/src/menus/extras-challenges.c index 642067e83..93c0f3ffe 100644 --- a/src/menus/extras-challenges.c +++ b/src/menus/extras-challenges.c @@ -397,6 +397,12 @@ void M_ChallengesTick(void) // We got one! M_ChallengesAutoFocus(newunlock, false); } + else if (gamedata->pendingkeyrounds > 0 + && (gamedata->chaokeys < GDMAX_CHAOKEYS)) + { + // Get ready to finish with pending chao key round tallying. + challengesmenu.chaokeyadd = true; + } else { // All done! Let's save the unlocks we've busted open.