Merge branch 'free-play-no-position' into 'master'

Disable POSITION in FREE PLAY

See merge request KartKrew/Kart!1394
This commit is contained in:
Oni 2023-08-13 14:56:07 +00:00
commit 3832ee9c0f
4 changed files with 17 additions and 16 deletions

View file

@ -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)

View file

@ -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);

View file

@ -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

View file

@ -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