mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-16 09:42:33 +00:00
De-ghetto 2P splitscreen FINISH. https://cdn.discordapp.com/attachments/270211093761097728/469827997990649856/kart0012.gif
This commit is contained in:
parent
c0a7891e60
commit
e30bbdde0b
1 changed files with 10 additions and 5 deletions
15
src/k_kart.c
15
src/k_kart.c
|
@ -5365,19 +5365,24 @@ static void K_drawKartFinish(void)
|
|||
if ((stplyr->kartstuff[k_cardanimation] % (2*5)) / 5) // blink
|
||||
pnum = 1;
|
||||
|
||||
if (splitscreen)
|
||||
if (splitscreen > 1)
|
||||
{
|
||||
V_DrawTinyScaledPatch(STCD_X - (SHORT(kp_racefinish[pnum]->width)/8), STCD_Y - (SHORT(kp_racefinish[pnum]->height)/8), splitflags, kp_racefinish[pnum]);
|
||||
return;
|
||||
}
|
||||
|
||||
{
|
||||
INT32 x = ((vid.width<<FRACBITS)/vid.dupx), xval = (SHORT(kp_racefinish[pnum]->width)<<(FRACBITS));
|
||||
INT32 scaleshift = (FRACBITS - splitscreen); // FRACUNIT or FRACUNIT/2
|
||||
INT32 x = ((vid.width<<FRACBITS)/vid.dupx), xval = (SHORT(kp_racefinish[pnum]->width)<<scaleshift);
|
||||
x = ((TICRATE - stplyr->kartstuff[k_cardanimation])*(xval > x ? xval : x))/TICRATE;
|
||||
|
||||
V_DrawFixedPatch(x + ((STCD_X - (SHORT(kp_racefinish[pnum]->width)/2))<<FRACBITS),
|
||||
(STCD_Y - (SHORT(kp_racefinish[pnum]->height)/2))<<FRACBITS,
|
||||
FRACUNIT, splitflags, kp_racefinish[pnum], NULL);
|
||||
if (splitscreen && stplyr == &players[secondarydisplayplayer])
|
||||
x = -x;
|
||||
|
||||
V_DrawFixedPatch(x + (STCD_X<<FRACBITS) - (SHORT(kp_racefinish[pnum]->width)<<(scaleshift-1)),
|
||||
(STCD_Y<<FRACBITS) - (SHORT(kp_racefinish[pnum]->height)<<(scaleshift-1)),
|
||||
(1<<scaleshift),
|
||||
splitflags, kp_racefinish[pnum], NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue