conflict moment

This commit is contained in:
Alug committed 2025-07-01 18:29:45 +02:00
1 parent 83d0f6bb50
commit 6c94e0c9bf
1 file changed
+12 -24
+12 -24
View File
@@ -1956,18 +1956,12 @@ static void K_DrawKartPositionNum(INT32 num)
INT32 W = kp_positionnum[0][0]->width;
fixed_t scale = FRACUNIT;
patch_t *localpatch = kp_positionnum[0][0];
INT32 addOrSub = B_SUBTRACT;
INT32 fx = 0, fy = 0, fflags = 0;
const INT32 xoffs = wheeloffs ? -48 : 0;
boolean flipdraw = false; // flip the order we draw it in for MORE splitscreen bs. fun.
boolean flipvdraw = false; // used only for 2p splitscreen so overtaking doesn't make 1P's position fly off the screen.
boolean overtake = false;
if ((mapheaderinfo[gamemap - 1]->levelflags & LF_SUBTRACTNUM) == LF_SUBTRACTNUM)
{
addOrSub = B_ADD;
}
if ((cv_posanim.value && stplyr->kartstuff[k_positiondelay]) || stplyr->exiting)
{
scale *= 2;
@@ -2024,12 +2018,14 @@ static void K_DrawKartPositionNum(INT32 num)
}
// Special case for 0
if (num <= 0)
if (!num)
{
V_DrawBlendingFixedPatch(fx<<FRACBITS, fy<<FRACBITS, scale, V_HUDTRANSHALF|fflags, kp_positionnum[0][0], NULL, addOrSub);
V_DrawFixedPatch(fx<<FRACBITS, fy<<FRACBITS, scale, V_HUDTRANSHALF|fflags, kp_positionnum[0][0], NULL);
return;
}
I_Assert(num >= 0); // This function does not draw negative numbers
// Draw the number
while (num)
{
@@ -2039,31 +2035,23 @@ static void K_DrawKartPositionNum(INT32 num)
}
else if (stplyr->laps+1 >= cv_numlaps.value || stplyr->exiting) // Check for the final lap, or won
{
boolean useRedNums = K_IsPlayerLosing(stplyr);
if (addOrSub == B_SUBTRACT)
{
// Subtracting RED will look BLUE, and vice versa.
useRedNums = !useRedNums;
}
// Alternate frame every three frames
switch ((leveltime % 9) / 3)
switch (leveltime % 9)
{
case 0:
if (useRedNums == true)
case 1: case 2: case 3:
if (K_IsPlayerLosing(stplyr))
localpatch = kp_positionnum[num % 10][4];
else
localpatch = kp_positionnum[num % 10][1];
break;
case 1:
if (useRedNums == true)
case 4: case 5: case 6:
if (K_IsPlayerLosing(stplyr))
localpatch = kp_positionnum[num % 10][5];
else
localpatch = kp_positionnum[num % 10][2];
break;
case 2:
if (useRedNums == true)
case 7: case 8: case 9:
if (K_IsPlayerLosing(stplyr))
localpatch = kp_positionnum[num % 10][6];
else
localpatch = kp_positionnum[num % 10][3];
@@ -2078,7 +2066,7 @@ static void K_DrawKartPositionNum(INT32 num)
localpatch = kp_positionnum[num % 10][0];
}
V_DrawBlendingFixedPatch((fx<<FRACBITS) + ((overtake && flipdraw) ? (localpatch->width*scale/2) : 0), (fy<<FRACBITS) + ((overtake && flipvdraw) ? (localpatch->height*scale/2) : 0), scale, V_HUDTRANSHALF|fflags, localpatch, NULL, addOrSub);
V_DrawFixedPatch((fx<<FRACBITS) + ((overtake && flipdraw) ? (localpatch->width*scale/2) : 0), (fy<<FRACBITS) + ((overtake && flipvdraw) ? (localpatch->height*scale/2) : 0), scale, V_HUDTRANSHALF|fflags, localpatch, NULL);
// ^ if we overtake as p1 or p3 in splitscren, we shift it so that it doesn't go off screen.
// ^ if we overtake as p1 in 2p splits, shift vertically so that this doesn't happen either.