mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 04:21:47 +00:00
Remove indents on #ifdefs and take K_drawInput in the hud_position check
This commit is contained in:
parent
f0a4388998
commit
d52d9d4c71
1 changed files with 29 additions and 21 deletions
50
src/k_kart.c
50
src/k_kart.c
|
|
@ -6432,6 +6432,11 @@ static boolean K_drawKartPositionFaces(void)
|
||||||
|
|
||||||
if (numplayersingame <= 1)
|
if (numplayersingame <= 1)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
#ifdef HAVE_BLUA
|
||||||
|
if (!LUA_HudEnabled(hud_minirankings))
|
||||||
|
return false; // Don't proceed but still return true for free play above if HUD is disabled.
|
||||||
|
#endif
|
||||||
|
|
||||||
for (j = 0; j < numplayersingame; j++)
|
for (j = 0; j < numplayersingame; j++)
|
||||||
{
|
{
|
||||||
|
|
@ -7547,9 +7552,9 @@ void K_drawKartHUD(void)
|
||||||
|
|
||||||
if (splitscreen == 2) // Player 4 in 3P is the minimap :p
|
if (splitscreen == 2) // Player 4 in 3P is the minimap :p
|
||||||
{
|
{
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
if (LUA_HudEnabled(hud_minimap))
|
if (LUA_HudEnabled(hud_minimap))
|
||||||
#endif
|
#endif
|
||||||
K_drawKartMinimap();
|
K_drawKartMinimap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -7577,25 +7582,25 @@ void K_drawKartHUD(void)
|
||||||
|
|
||||||
if (splitscreen == 0 && cv_kartminimap.value)
|
if (splitscreen == 0 && cv_kartminimap.value)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
if (LUA_HudEnabled(hud_minimap))
|
if (LUA_HudEnabled(hud_minimap))
|
||||||
#endif
|
#endif
|
||||||
K_drawKartMinimap(); // 3P splitscreen is handled above
|
K_drawKartMinimap(); // 3P splitscreen is handled above
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw the item window
|
// Draw the item window
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
if (LUA_HudEnabled(hud_item))
|
if (LUA_HudEnabled(hud_item))
|
||||||
#endif
|
#endif
|
||||||
K_drawKartItem();
|
K_drawKartItem();
|
||||||
|
|
||||||
// Draw WANTED status
|
// Draw WANTED status
|
||||||
if (G_BattleGametype())
|
if (G_BattleGametype())
|
||||||
{
|
{
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
if (LUA_HudEnabled(hud_wanted))
|
if (LUA_HudEnabled(hud_wanted))
|
||||||
#endif
|
#endif
|
||||||
K_drawKartWanted();
|
K_drawKartWanted();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -7603,17 +7608,17 @@ void K_drawKartHUD(void)
|
||||||
if (!splitscreen)
|
if (!splitscreen)
|
||||||
{
|
{
|
||||||
// Draw the timestamp
|
// Draw the timestamp
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
if (LUA_HudEnabled(hud_time))
|
if (LUA_HudEnabled(hud_time))
|
||||||
#endif
|
#endif
|
||||||
K_drawKartTimestamp(stplyr->realtime, TIME_X, TIME_Y, gamemap, true);
|
K_drawKartTimestamp(stplyr->realtime, TIME_X, TIME_Y, gamemap, true);
|
||||||
|
|
||||||
if (!modeattacking)
|
if (!modeattacking)
|
||||||
{
|
{
|
||||||
// The top-four faces on the left
|
// The top-four faces on the left
|
||||||
#ifdef HAVE_BLUA
|
/*#ifdef HAVE_BLUA
|
||||||
if (LUA_HudEnabled(hud_minirankings))
|
if (LUA_HudEnabled(hud_minirankings))
|
||||||
#endif
|
#endif*/
|
||||||
isfreeplay = K_drawKartPositionFaces();
|
isfreeplay = K_drawKartPositionFaces();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -7623,18 +7628,18 @@ void K_drawKartHUD(void)
|
||||||
if (G_RaceGametype()) // Race-only elements
|
if (G_RaceGametype()) // Race-only elements
|
||||||
{
|
{
|
||||||
// Draw the lap counter
|
// Draw the lap counter
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
if (LUA_HudEnabled(hud_gametypeinfo))
|
if (LUA_HudEnabled(hud_gametypeinfo))
|
||||||
#endif
|
#endif
|
||||||
K_drawKartLaps();
|
K_drawKartLaps();
|
||||||
|
|
||||||
if (!splitscreen)
|
if (!splitscreen)
|
||||||
{
|
{
|
||||||
// Draw the speedometer
|
// Draw the speedometer
|
||||||
// TODO: Make a better speedometer.
|
// TODO: Make a better speedometer.
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
if (LUA_HudEnabled(hud_speedometer))
|
if (LUA_HudEnabled(hud_speedometer))
|
||||||
#endif
|
#endif
|
||||||
K_drawKartSpeedometer();
|
K_drawKartSpeedometer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -7643,23 +7648,26 @@ void K_drawKartHUD(void)
|
||||||
else if (!modeattacking)
|
else if (!modeattacking)
|
||||||
{
|
{
|
||||||
// Draw the numerical position
|
// Draw the numerical position
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
if (LUA_HudEnabled(hud_position))
|
if (LUA_HudEnabled(hud_position))
|
||||||
#endif
|
#endif
|
||||||
K_DrawKartPositionNum(stplyr->kartstuff[k_position]);
|
K_DrawKartPositionNum(stplyr->kartstuff[k_position]);
|
||||||
}
|
}
|
||||||
else //if (!(demoplayback && hu_showscores))
|
else //if (!(demoplayback && hu_showscores))
|
||||||
{
|
{
|
||||||
// Draw the input UI
|
// Draw the input UI
|
||||||
K_drawInput();
|
#ifdef HAVE_BLUA
|
||||||
|
if (LUA_HudEnabled(hud_position))
|
||||||
|
#endif
|
||||||
|
K_drawInput();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (G_BattleGametype()) // Battle-only
|
else if (G_BattleGametype()) // Battle-only
|
||||||
{
|
{
|
||||||
// Draw the hits left!
|
// Draw the hits left!
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
if (LUA_HudEnabled(hud_gametypeinfo))
|
if (LUA_HudEnabled(hud_gametypeinfo))
|
||||||
#endif
|
#endif
|
||||||
K_drawKartBumpersOrKarma();
|
K_drawKartBumpersOrKarma();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue