From 92c117d186c29b77b829e6ec6d88082bbd3e1016 Mon Sep 17 00:00:00 2001 From: Eidolon Date: Tue, 30 Sep 2025 21:09:10 -0500 Subject: [PATCH 1/6] remove more g++ warning flags --- src/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a5462ee1b..89771918b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -624,8 +624,6 @@ target_compile_options(SRB2SDL2 PRIVATE -Wall -Wno-c++11-compat -Wno-c++14-compat # No C++14 compat needed - -Wc++20-extensions - -Wc++23-extensions # Disallow newer language features entirely > # C++, Clang and Apple Clang From 2989d3564efd643432972bf9088738f9a501c66f Mon Sep 17 00:00:00 2001 From: FreakyMutantMan Date: Tue, 30 Sep 2025 21:22:57 -0700 Subject: [PATCH 2/6] Add check to GP_GPCupIntoRoundQueue to ensure maps with both Race and Battle TOL flags are properly accounted for in bonus game queue. --- src/g_game.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/g_game.c b/src/g_game.c index ba93a32ea..8a2bcd583 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -4202,6 +4202,7 @@ void G_GPCupIntoRoundQueue(cupheader_t *cup, UINT8 setgametype, boolean setencor UINT8 i, levelindex = 0, bonusindex = 0; UINT8 bonusmodulo = max(1, (cup->numlevels+1)/(cup->numbonus+1)); UINT16 cupLevelNum; + INT32 bonusgt; // Levels are added to the queue in the following pattern. // For 5 Race rounds and 2 Bonus rounds, the most common case: @@ -4243,9 +4244,17 @@ void G_GPCupIntoRoundQueue(cupheader_t *cup, UINT8 setgametype, boolean setencor if (cupLevelNum < nummapheaders) { // In the case of Bonus rounds, we simply skip invalid maps. + if ((mapheaderinfo[cupLevelNum]->typeoflevel & TOL_BATTLE) == TOL_BATTLE) + { + bonusgt = GT_BATTLE; + } + else + { + bonusgt = G_GuessGametypeByTOL(mapheaderinfo[cupLevelNum]->typeoflevel); + } G_MapIntoRoundQueue( cupLevelNum, - G_GuessGametypeByTOL(mapheaderinfo[cupLevelNum]->typeoflevel), + bonusgt, setencore, // if this isn't correct, Got_Mapcmd will fix it false ); From 48e60648f64776bcec522756d029fe5ed8d91d48 Mon Sep 17 00:00:00 2001 From: Eidolon Date: Thu, 2 Oct 2025 12:33:24 -0500 Subject: [PATCH 3/6] Fix clang-cl compilation from showgremlins patch --- src/p_test.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/p_test.cpp b/src/p_test.cpp index 2c4ebf57f..beb85626b 100644 --- a/src/p_test.cpp +++ b/src/p_test.cpp @@ -30,9 +30,10 @@ void P_TestLine(line_t* ld) g_lines.emplace_back(ld); } +extern "C" consvar_t cv_showgremlins; + line_t* P_SweepTestLines(fixed_t ax, fixed_t ay, fixed_t bx, fixed_t by, fixed_t r, vector2_t* return_normal) { - extern consvar_t cv_showgremlins; using namespace srb2::math; using namespace srb2::sweep; From 494f4c1641677b80f777a49c4d9cccee90082445 Mon Sep 17 00:00:00 2001 From: Eidolon Date: Thu, 2 Oct 2025 12:33:43 -0500 Subject: [PATCH 4/6] and this whitespace --- src/p_test.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/p_test.cpp b/src/p_test.cpp index beb85626b..ca6e7b333 100644 --- a/src/p_test.cpp +++ b/src/p_test.cpp @@ -34,7 +34,6 @@ extern "C" consvar_t cv_showgremlins; line_t* P_SweepTestLines(fixed_t ax, fixed_t ay, fixed_t bx, fixed_t by, fixed_t r, vector2_t* return_normal) { - using namespace srb2::math; using namespace srb2::sweep; From 6780b5f6078308f2dc09124c3011d8e7016e4bb8 Mon Sep 17 00:00:00 2001 From: FreakyMutantMan Date: Thu, 2 Oct 2025 16:28:59 -0700 Subject: [PATCH 5/6] Add checks to G_GPCupIntoRoundQueue to account for potential multi-gametype special stage maps (in order of Special>Versus>guess). --- src/g_game.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/g_game.c b/src/g_game.c index 8a2bcd583..d80832774 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -4322,9 +4322,22 @@ void G_GPCupIntoRoundQueue(cupheader_t *cup, UINT8 setgametype, boolean setencor cupLevelNum = emeraldcup->cachedlevels[CUPCACHE_SPECIAL]; if (cupLevelNum < nummapheaders) { + // In case of multiple TOLs, prioritize Special, then Versus, then guess. + if ((mapheaderinfo[cupLevelNum]->typeoflevel & TOL_SPECIAL) == TOL_SPECIAL) + { + bonusgt = GT_SPECIAL; + } + else if ((mapheaderinfo[cupLevelNum]->typeoflevel & TOL_VERSUS) == TOL_VERSUS) + { + bonusgt = GT_VERSUS; + } + else + { + bonusgt = G_GuessGametypeByTOL(mapheaderinfo[cupLevelNum]->typeoflevel); + } G_MapIntoRoundQueue( cupLevelNum, - G_GuessGametypeByTOL(mapheaderinfo[cupLevelNum]->typeoflevel), + bonusgt, setencore, // if this isn't correct, Got_Mapcmd will fix it true // Rank-restricted! ); From 7d6289817da9d284cb90dc7ca7909b27b4b5b776 Mon Sep 17 00:00:00 2001 From: Wumbo <58399748+WumboSpasm@users.noreply.github.com> Date: Mon, 6 Oct 2025 11:43:59 -0400 Subject: [PATCH 6/6] Fix ground followers phasing through FOFs --- src/k_follower.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/k_follower.c b/src/k_follower.c index 74d52d6aa..232e509e3 100644 --- a/src/k_follower.c +++ b/src/k_follower.c @@ -477,10 +477,8 @@ void K_HandleFollower(player_t *player) if (fl->mode == FOLLOWERMODE_GROUND) { - sector_t *sec = R_PointInSubsector(sx, sy)->sector; - - fh = min(fh, P_GetFloorZ(player->follower, sec, sx, sy, NULL)); - ch = max(ch, P_GetCeilingZ(player->follower, sec, sx, sy, NULL) - ourheight); + fh = min(fh, P_FloorzAtPos(sx, sy, player->follower->z, ourheight)); + ch = max(ch, P_CeilingzAtPos(sx, sy, player->follower->z, ourheight) - ourheight); if (P_IsObjectOnGround(player->mo) == false) {