diff --git a/src/doomdef.h b/src/doomdef.h index 6fabd9744..afbe61b21 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -604,8 +604,8 @@ extern const char *compdate, *comptime, *comprevision, *compbranch; // undefine to enable fixes and features that are not vanilla compatible #define COMPAT_VANILLA -// if we build with 32 player (or more!) support we dont need to care vanilla compat -#if MAXPLAYERS > 16 +// if we build with 32 player (or more or less!) support we dont need to care vanilla compat +#if MAXPLAYERS != 16 #undef COMPAT_VANILLA #endif diff --git a/src/g_game.c b/src/g_game.c index 9cc58d19e..c133050d8 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -2630,12 +2630,18 @@ mapthing_t *G_FindRaceStart(INT32 playernum) // Just spawn there. //return playerstarts[0]; +#if MAXPLAYERS > 16 + //this section courtesy of fickle - v1.1 battle royale + // screw collision chex + return playerstarts[pos % numcoopstarts]; +#else if (P_IsLocalPlayerNum(playernum)) { CONS_Alert(CONS_WARNING, "Could not spawn at any Race starts!\n"); } return NULL; +#endif } if (P_IsLocalPlayerNum(playernum)) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index c61ecc9f2..8f131b3d2 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -2830,8 +2830,9 @@ static void HU_DrawRankings(void) scorelines++; #if MAXPLAYERS > 16 - if (scorelines > 16) - break; //dont draw past bottom of screen, show the best only + // 32 Player TODO: port over and cleanup scoreboard from sat-32p/blankart + if (scorelines >= 16) + break; // dont draw past bottom of screen, show the best only #endif } diff --git a/src/k_hud.c b/src/k_hud.c index 545cd957a..97f927a06 100644 --- a/src/k_hud.c +++ b/src/k_hud.c @@ -695,6 +695,9 @@ void K_LoadKartHUDGraphics(void) kp_winnernum[i] = (patch_t *)W_CachePatchName(buffer, PU_HUDGFX); } + // 32 player note: there are only 16 of those! + // so slots after this will just be missing patches! + // but keeping like this incase of missed adjustments which might cause crashes otherwise snprintf(buffer, sizeof(buffer), "OPPRNKxx"); for (i = 0; i <= MAXPLAYERS; i++) { @@ -2294,6 +2297,11 @@ static boolean K_drawKartPositionFaces(void) if (pos < 0 || pos > MAXPLAYERS) pos = 0; +#if MAXPLAYERS > 16 + if (pos > 16) + V_DrawPingNum(FACE_X+2, Y+10, V_HUDTRANS|V_SNAPTOLEFT, pos, NULL); + else +#endif // Draws the little number over the face V_DrawScaledPatch(FACE_X-5, Y+10, V_HUDTRANS|V_SNAPTOLEFT, kp_facenum[pos]); } @@ -2385,6 +2393,12 @@ void HU_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, I INT32 pos = player->kartstuff[k_position]; if (pos < 0 || pos > MAXPLAYERS) pos = 0; + +#if MAXPLAYERS > 16 + if (pos > 16) + V_DrawPingNum(x+2, y+10, 0, pos, NULL); + else +#endif // Draws the little number over the face V_DrawScaledPatch(x-5, y+6, 0, kp_facenum[pos]); } diff --git a/src/k_kart.c b/src/k_kart.c index e77c0b5ee..e8b48e7d8 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -1033,6 +1033,12 @@ INT32 K_KartGetItemOdds(UINT8 pos, SINT8 item, fixed_t mashed, boolean spbrush) } } +#if MAXPLAYERS > 16 + // courtesy of fickle from 1.1 battleroyale + // battleroyale: limit how much items will scale to try to prevent shit-tier items in shit-huge netames + pingame = min(pingame, 12); +#endif + if (first != -1 && second != -1) // calculate 2nd's distance from 1st, for SPB { secondist = P_AproxDistance(P_AproxDistance(players[first].mo->x - players[second].mo->x, diff --git a/src/m_menu.c b/src/m_menu.c index cabcadf7f..3c9779d65 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -7650,11 +7650,8 @@ static void M_DrawMPMainMenu(void) // use generic drawer for cursor, items and title M_DrawGenericMenu(); -#if MAXPLAYERS != 16 -Update the maxplayers label... -#endif V_DrawRightAlignedString(BASEVIDWIDTH-x, y+MP_MainMenu[4].alphaKey, - ((itemOn == 4) ? highlightflags : 0)|MENUCAPS, "(2-16 Players)"); + ((itemOn == 4) ? highlightflags : 0)|MENUCAPS, va("(2-%d Players)", MAXPLAYERS)); V_DrawRightAlignedString(BASEVIDWIDTH-x, y+MP_MainMenu[5].alphaKey, ((itemOn == 5) ? highlightflags : 0)|MENUCAPS, diff --git a/src/y_inter.c b/src/y_inter.c index 97df280c5..9c5fc9c0f 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -274,13 +274,13 @@ static void Y_CalculateMatchData(UINT8 rankingsmode, void (*comparison)(INT32)) // static void Y_PlayerStandingsDrawer(y_data_t *standings, INT32 x, INT32 hilicol) { + INT32 i; + if (standings->numplayers == 0) { return; } - INT32 i; - #define NUMFORNEWCOLUMN 8 INT32 y = 41, gutter = ((standings->numplayers > NUMFORNEWCOLUMN) ? 0 : (BASEVIDWIDTH/2)); INT32 dupadjust = cv_betainterscreen.value ? 314 : vid.scaledwidth, duptweak = cv_betainterscreen.value ? -3 : (dupadjust - BASEVIDWIDTH)/2; @@ -321,6 +321,12 @@ static void Y_PlayerStandingsDrawer(y_data_t *standings, INT32 x, INT32 hilicol) const UINT8 pnum = standings->num[i]; player_t *player = &players[pnum]; +#if MAXPLAYERS > 16 + // 32 Player TODO: port over and cleanup standings drawer from sat-32p/blankart + if (i > 16) + break; +#endif + if (pnum == MAXPLAYERS) ; else if (!playeringame[pnum] || player->spectator)