mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-20 15:02:37 +00:00
Merge branch 'splitscreen-hud-fixes' into 'master'
Fixes for splitscreen: "Save Replay" button and input display vs 4P tally Closes #1208 See merge request KartKrew/Kart!2168
This commit is contained in:
commit
91b2365d86
2 changed files with 32 additions and 3 deletions
|
|
@ -5248,6 +5248,24 @@ static void K_drawInput(void)
|
||||||
char mode = ((stplyr->pflags & PF_ANALOGSTICK) ? '4' : '2') + (r_splitscreen > 1);
|
char mode = ((stplyr->pflags & PF_ANALOGSTICK) ? '4' : '2') + (r_splitscreen > 1);
|
||||||
bool local = !demo.playback && P_IsMachineLocalPlayer(stplyr);
|
bool local = !demo.playback && P_IsMachineLocalPlayer(stplyr);
|
||||||
fixed_t slide = K_GetDialogueSlide(FRACUNIT);
|
fixed_t slide = K_GetDialogueSlide(FRACUNIT);
|
||||||
|
INT32 tallySlide = []
|
||||||
|
{
|
||||||
|
if (r_splitscreen <= 1)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (!stplyr->tally.active)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
constexpr INT32 kSlideDown = 22;
|
||||||
|
if (stplyr->tally.state == TALLY_ST_GOTTHRU_SLIDEIN ||
|
||||||
|
stplyr->tally.state == TALLY_ST_GAMEOVER_SLIDEIN)
|
||||||
|
{
|
||||||
|
return Easing_OutQuad(std::min<fixed_t>(stplyr->tally.transition * 2, FRACUNIT), 0, kSlideDown);
|
||||||
|
}
|
||||||
|
return kSlideDown;
|
||||||
|
}();
|
||||||
if (slide)
|
if (slide)
|
||||||
flags &= ~(V_SNAPTORIGHT); // don't draw underneath the dialogue box in non-green resolutions
|
flags &= ~(V_SNAPTORIGHT); // don't draw underneath the dialogue box in non-green resolutions
|
||||||
|
|
||||||
|
|
@ -5264,7 +5282,7 @@ static void K_drawInput(void)
|
||||||
|
|
||||||
K_DrawInputDisplay(
|
K_DrawInputDisplay(
|
||||||
def[k][0] - FixedToFloat(34 * slide),
|
def[k][0] - FixedToFloat(34 * slide),
|
||||||
def[k][1] - FixedToFloat(51 * slide),
|
def[k][1] - FixedToFloat(51 * slide) + tallySlide,
|
||||||
flags,
|
flags,
|
||||||
mode,
|
mode,
|
||||||
(local ? G_LocalSplitscreenPartyPosition : G_PartyPosition)(stplyr - players),
|
(local ? G_LocalSplitscreenPartyPosition : G_PartyPosition)(stplyr - players),
|
||||||
|
|
|
||||||
13
src/p_user.c
13
src/p_user.c
|
|
@ -1328,9 +1328,20 @@ void P_DoPlayerExit(player_t *player, pflags_t flags)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!demo.savebutton && P_IsMachineLocalPlayer(player))
|
if (!demo.savebutton)
|
||||||
|
{
|
||||||
|
UINT8 outstanding = splitscreen + 1;
|
||||||
|
for (UINT8 i = 0; i <= splitscreen; ++i)
|
||||||
|
{
|
||||||
|
if (players[g_localplayers[i]].exiting)
|
||||||
|
outstanding--;
|
||||||
|
}
|
||||||
|
// Once the entire local party finishes (not
|
||||||
|
// online party), show the "Save Replay" button.
|
||||||
|
if (!outstanding)
|
||||||
demo.savebutton = leveltime;
|
demo.savebutton = leveltime;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue