mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-18 11:32:24 +00:00
FREE PLAY: Correct mistaken assumptions.
- Make the check consistent between HUD and Challenge conditions by revolving both around M_NotFreePlay.
- The HUD appearance checked every individual component of K_CanChangeRules, so just straight up do that here.
- If the rules can be changed, battleprisons is always FREE PLAY no matter how many players are present (because it can change quickly).
This commit is contained in:
parent
8d804872cf
commit
8d66b279f8
3 changed files with 19 additions and 24 deletions
27
src/k_hud.c
27
src/k_hud.c
|
|
@ -4294,22 +4294,7 @@ static void K_drawBattleFullscreen(void)
|
|||
}
|
||||
|
||||
// FREE PLAY?
|
||||
if (K_Cooperative() == false)
|
||||
{
|
||||
UINT8 i;
|
||||
|
||||
// check to see if there's anyone else at all
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (i == displayplayers[0])
|
||||
continue;
|
||||
if (playeringame[i] && !players[i].spectator)
|
||||
break;
|
||||
}
|
||||
|
||||
if (i == MAXPLAYERS)
|
||||
K_drawKartFreePlay();
|
||||
}
|
||||
K_drawKartFreePlay();
|
||||
}
|
||||
|
||||
static void K_drawKartFirstPerson(void)
|
||||
|
|
@ -4701,12 +4686,13 @@ static void K_drawTrickCool(void)
|
|||
|
||||
void K_drawKartFreePlay(void)
|
||||
{
|
||||
// Doesn't support splitscreens higher than 2 for real estate reasons.
|
||||
|
||||
if (!LUA_HudEnabled(hud_freeplay))
|
||||
return;
|
||||
|
||||
if (modeattacking || grandprixinfo.gp || bossinfo.valid || stplyr->spectator)
|
||||
if (stplyr->spectator == true)
|
||||
return;
|
||||
|
||||
if (M_NotFreePlay(stplyr) == true)
|
||||
return;
|
||||
|
||||
if (lt_exitticker < TICRATE/2)
|
||||
|
|
@ -5181,8 +5167,7 @@ void K_drawKartHUD(void)
|
|||
V_DrawScaledPatch(BASEVIDWIDTH/2 - (SHORT(kp_yougotem->width)/2), 32, V_HUDTRANS, kp_yougotem);
|
||||
|
||||
// Draw FREE PLAY.
|
||||
if (islonesome && K_Cooperative() == false && gametype != GT_TUTORIAL)
|
||||
K_drawKartFreePlay();
|
||||
K_drawKartFreePlay();
|
||||
|
||||
if (r_splitscreen == 0 && (stplyr->pflags & PF_WRONGWAY) && ((leveltime / 8) & 1))
|
||||
{
|
||||
|
|
|
|||
14
src/m_cond.c
14
src/m_cond.c
|
|
@ -624,13 +624,21 @@ void M_UpdateConditionSetsPending(void)
|
|||
}
|
||||
}
|
||||
|
||||
static boolean M_NotFreePlay(player_t *player)
|
||||
boolean M_NotFreePlay(player_t *player)
|
||||
{
|
||||
UINT8 i;
|
||||
|
||||
// Rounds that permit Cooperative play can be played by yourself without being FREE PLAY.
|
||||
if (K_Cooperative())
|
||||
if (K_CanChangeRules(true) == false)
|
||||
{
|
||||
// Rounds with direction are never FREE PLAY.
|
||||
return true;
|
||||
}
|
||||
|
||||
if (battleprisons)
|
||||
{
|
||||
// Prison Break is battle's FREE PLAY.
|
||||
return false;
|
||||
}
|
||||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -325,6 +325,8 @@ void M_ClearConditionSet(UINT8 set);
|
|||
void M_ClearSecrets(void);
|
||||
void M_ClearStats(void);
|
||||
|
||||
boolean M_NotFreePlay(player_t *player);
|
||||
|
||||
// Updating conditions and unlockables
|
||||
boolean M_CheckCondition(condition_t *cn, player_t *player);
|
||||
boolean M_UpdateUnlockablesAndExtraEmblems(boolean loud, boolean doall);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue