mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Move input display out of the way of 4P tally
This commit is contained in:
parent
681e95ca0c
commit
69e8d735a1
1 changed files with 20 additions and 1 deletions
|
|
@ -53,6 +53,7 @@
|
|||
#include "g_input.h"
|
||||
#include "k_dialogue.h"
|
||||
#include "f_finale.h"
|
||||
#include "m_easing.h"
|
||||
|
||||
//{ Patch Definitions
|
||||
static patch_t *kp_nodraw;
|
||||
|
|
@ -5247,11 +5248,29 @@ static void K_drawInput(void)
|
|||
char mode = ((stplyr->pflags & PF_ANALOGSTICK) ? '4' : '2') + (r_splitscreen > 1);
|
||||
bool local = !demo.playback && P_IsMachineLocalPlayer(stplyr);
|
||||
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)
|
||||
flags &= ~(V_SNAPTORIGHT); // don't draw underneath the dialogue box in non-green resolutions
|
||||
K_DrawInputDisplay(
|
||||
def[k][0] - FixedToFloat(34 * slide),
|
||||
def[k][1] - FixedToFloat(51 * slide),
|
||||
def[k][1] - FixedToFloat(51 * slide) + tallySlide,
|
||||
flags,
|
||||
mode,
|
||||
(local ? G_LocalSplitscreenPartyPosition : G_PartyPosition)(stplyr - players),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue