From 677b34c1748b2730c4a7c4d3b5edfd3acdfbae0a Mon Sep 17 00:00:00 2001 From: Alug Date: Mon, 24 Nov 2025 21:16:07 +0100 Subject: [PATCH] dont free PU_PATCH_LOWPRIORITY patches in render_none also dont cache them either! simply not needed at all so save us a little work --- src/f_finale.c | 1 - src/p_setup.c | 8 ++++++-- src/y_inter.c | 7 ++++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/f_finale.c b/src/f_finale.c index 6f221ff4d..0d3f6e64d 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -622,7 +622,6 @@ void F_StartCredits(void) timetonext = 2*TICRATE; } - void F_CreditDrawer(void) { UINT16 i; diff --git a/src/p_setup.c b/src/p_setup.c index ab6865321..91a41abd2 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -2709,8 +2709,12 @@ void P_FreeLevelState(void) G_FreeGhosts(); // ghosts are allocated with PU_LEVEL - Patch_FreeTag(PU_PATCH_LOWPRIORITY); - //Patch_FreeTag(PU_PATCH_ROTATED); // we keep those ty! + if (rendermode != render_none) + { + Patch_FreeTag(PU_PATCH_LOWPRIORITY); + //Patch_FreeTag(PU_PATCH_ROTATED); // we keep those ty! + } + Z_FreeTags(PU_LEVEL, PU_PURGELEVEL - 1); Y_VoteClear(); diff --git a/src/y_inter.c b/src/y_inter.c index c1bdafd32..018989ea4 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -753,7 +753,7 @@ void Y_StartIntermission(void) } // This should always exist, but just in case... - if(!mapheaderinfo[prevmap]) + if (!mapheaderinfo[prevmap]) P_AllocMapHeader(prevmap); switch (intertype) @@ -788,7 +788,8 @@ void Y_StartIntermission(void) break; } - bgtile = W_CachePatchName("SRB2BACK", PU_PATCH_LOWPRIORITY); + if (rendermode != render_none) + bgtile = W_CachePatchName("SRB2BACK", PU_PATCH_LOWPRIORITY); LUA_HUD_DestroyDrawList(luahuddrawlist_intermission); luahuddrawlist_intermission = LUA_HUD_CreateDrawList(); @@ -1537,7 +1538,7 @@ void Y_StartVote(void) levelinfo[i].gts = NULL; // set up the pic - if (!dedicated) + if (rendermode != render_none) { lumpnum = W_CheckNumForName(va("%sP", G_BuildMapName(votelevels[i][0]+1))); if (lumpnum != LUMPERROR)