diff --git a/src/k_hud.c b/src/k_hud.c index 20da0419c..0d928db0c 100644 --- a/src/k_hud.c +++ b/src/k_hud.c @@ -5070,7 +5070,7 @@ void K_drawKartFreePlay(void) if (stplyr->spectator == true) return; - if (M_NotFreePlay(stplyr) == true) + if (M_NotFreePlay() == true) return; if (lt_exitticker < TICRATE/2) diff --git a/src/k_kart.c b/src/k_kart.c index f02ed54f2..79e135234 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -256,12 +256,12 @@ void K_TimerInit(void) } } - if (cv_kartdebugstart.value) + if (cv_kartdebugstart.value || M_NotFreePlay() == false) { starttime = 0; introtime = 0; } - + K_SpawnItemCapsules(); K_BattleInit(domodeattack); diff --git a/src/m_cond.c b/src/m_cond.c index 22c9e7db9..b66ee1af8 100644 --- a/src/m_cond.c +++ b/src/m_cond.c @@ -705,9 +705,10 @@ void M_UpdateConditionSetsPending(void) } } -boolean M_NotFreePlay(player_t *player) +boolean M_NotFreePlay(void) { UINT8 i; + UINT8 nump = 0; if (K_CanChangeRules(true) == false) { @@ -728,12 +729,12 @@ boolean M_NotFreePlay(player_t *player) continue; } - if (player == &players[i]) - { - continue; - } + nump++; - return true; + if (nump > 1) + { + return true; + } } return false; @@ -925,35 +926,35 @@ boolean M_CheckCondition(condition_t *cn, player_t *player) case UCRP_FINISHCOOL: return (player->exiting && !(player->pflags & PF_NOCONTEST) - && M_NotFreePlay(player) + && M_NotFreePlay() && !K_IsPlayerLosing(player)); case UCRP_FINISHALLPRISONS: return (battleprisons && !(player->pflags & PF_NOCONTEST) - //&& M_NotFreePlay(player) + //&& M_NotFreePlay() && numtargets >= maptargets); case UCRP_NOCONTEST: return (player->pflags & PF_NOCONTEST); case UCRP_FINISHPLACE: return (player->exiting && !(player->pflags & PF_NOCONTEST) - && M_NotFreePlay(player) + && M_NotFreePlay() && player->position != 0 && player->position <= cn->requirement); case UCRP_FINISHPLACEEXACT: return (player->exiting && !(player->pflags & PF_NOCONTEST) - && M_NotFreePlay(player) + && M_NotFreePlay() && player->position == cn->requirement); case UCRP_FINISHTIME: return (player->exiting && !(player->pflags & PF_NOCONTEST) - //&& M_NotFreePlay(player) + //&& M_NotFreePlay() && player->realtime <= (unsigned)cn->requirement); case UCRP_FINISHTIMEEXACT: return (player->exiting && !(player->pflags & PF_NOCONTEST) - //&& M_NotFreePlay(player) + //&& M_NotFreePlay() && player->realtime/TICRATE == (unsigned)cn->requirement/TICRATE); case UCRP_FINISHTIMELEFT: return (timelimitintics diff --git a/src/m_cond.h b/src/m_cond.h index 6ca875ab5..e93ef7857 100644 --- a/src/m_cond.h +++ b/src/m_cond.h @@ -343,7 +343,7 @@ void M_ClearConditionSet(UINT16 set); void M_ClearSecrets(void); void M_ClearStats(void); -boolean M_NotFreePlay(player_t *player); +boolean M_NotFreePlay(void); UINT16 M_CheckCupEmeralds(UINT8 difficulty); // Updating conditions and unlockables