mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 20:41:46 +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?
|
// FREE PLAY?
|
||||||
if (K_Cooperative() == false)
|
K_drawKartFreePlay();
|
||||||
{
|
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void K_drawKartFirstPerson(void)
|
static void K_drawKartFirstPerson(void)
|
||||||
|
|
@ -4701,12 +4686,13 @@ static void K_drawTrickCool(void)
|
||||||
|
|
||||||
void K_drawKartFreePlay(void)
|
void K_drawKartFreePlay(void)
|
||||||
{
|
{
|
||||||
// Doesn't support splitscreens higher than 2 for real estate reasons.
|
|
||||||
|
|
||||||
if (!LUA_HudEnabled(hud_freeplay))
|
if (!LUA_HudEnabled(hud_freeplay))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (modeattacking || grandprixinfo.gp || bossinfo.valid || stplyr->spectator)
|
if (stplyr->spectator == true)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (M_NotFreePlay(stplyr) == true)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (lt_exitticker < TICRATE/2)
|
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);
|
V_DrawScaledPatch(BASEVIDWIDTH/2 - (SHORT(kp_yougotem->width)/2), 32, V_HUDTRANS, kp_yougotem);
|
||||||
|
|
||||||
// Draw FREE PLAY.
|
// 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))
|
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;
|
UINT8 i;
|
||||||
|
|
||||||
// Rounds that permit Cooperative play can be played by yourself without being FREE PLAY.
|
if (K_CanChangeRules(true) == false)
|
||||||
if (K_Cooperative())
|
{
|
||||||
|
// Rounds with direction are never FREE PLAY.
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (battleprisons)
|
||||||
|
{
|
||||||
|
// Prison Break is battle's FREE PLAY.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -325,6 +325,8 @@ void M_ClearConditionSet(UINT8 set);
|
||||||
void M_ClearSecrets(void);
|
void M_ClearSecrets(void);
|
||||||
void M_ClearStats(void);
|
void M_ClearStats(void);
|
||||||
|
|
||||||
|
boolean M_NotFreePlay(player_t *player);
|
||||||
|
|
||||||
// Updating conditions and unlockables
|
// Updating conditions and unlockables
|
||||||
boolean M_CheckCondition(condition_t *cn, player_t *player);
|
boolean M_CheckCondition(condition_t *cn, player_t *player);
|
||||||
boolean M_UpdateUnlockablesAndExtraEmblems(boolean loud, boolean doall);
|
boolean M_UpdateUnlockablesAndExtraEmblems(boolean loud, boolean doall);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue