diff --git a/src/deh_soc.c b/src/deh_soc.c index a0a1c5335..7e1b228b6 100644 --- a/src/deh_soc.c +++ b/src/deh_soc.c @@ -2894,6 +2894,7 @@ static void readcondition(UINT16 set, UINT32 id, char *word2) ty = UCRP_PODIUMEMERALD + offset; } else if ((offset=0) || fastcmp(params[0], "FINISHCOOL") + || (++offset && fastcmp(params[0], "FINISHPERFECT")) || (++offset && fastcmp(params[0], "FINISHALLPRISONS")) || (++offset && fastcmp(params[0], "NOCONTEST"))) { diff --git a/src/m_cond.c b/src/m_cond.c index bcce1c0b5..0743f765a 100644 --- a/src/m_cond.c +++ b/src/m_cond.c @@ -1489,6 +1489,14 @@ boolean M_CheckCondition(condition_t *cn, player_t *player) && !(player->pflags & PF_NOCONTEST) && M_NotFreePlay() && !K_IsPlayerLosing(player)); + case UCRP_FINISHPERFECT: + return (player->exiting + && !(player->pflags & PF_NOCONTEST) + && M_NotFreePlay() + && (gamespeed != KARTSPEED_EASY) + && (player->tally.active == true) + && (player->tally.totalLaps > 0) // Only true if not Time Attack + && (player->tally.laps >= player->tally.totalLaps)); case UCRP_FINISHALLPRISONS: return (battleprisons && !(player->pflags & PF_NOCONTEST) @@ -2216,6 +2224,8 @@ static const char *M_GetConditionString(condition_t *cn) case UCRP_FINISHCOOL: return "finish in good standing"; + case UCRP_FINISHPERFECT: + return "finish a perfect round"; case UCRP_FINISHALLPRISONS: return "break every prison"; case UCRP_NOCONTEST: diff --git a/src/m_cond.h b/src/m_cond.h index 39b1ecb02..2c02c57af 100644 --- a/src/m_cond.h +++ b/src/m_cond.h @@ -94,6 +94,7 @@ typedef enum UCRP_PODIUMPRIZE, // Get to podium sequence with that cup's bonus (alternate string version of UCRP_PODIUMEMERALD UCRP_FINISHCOOL, // Finish in good standing + UCRP_FINISHPERFECT, // Finish a perfect race UCRP_FINISHALLPRISONS, // Break all prisons UCRP_NOCONTEST, // No Contest