From 93eb2b336d686fb476d8e8ac59c5bb64c9cf38f0 Mon Sep 17 00:00:00 2001 From: Alug Date: Mon, 24 Nov 2025 21:32:17 +0100 Subject: [PATCH] Dedicated: dont create or destroy ANY lua hud drawlist not needed at all in dedi --- src/hu_stuff.c | 6 ++++-- src/y_inter.c | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 4f7ce6ef9..c8ae3aa60 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -100,7 +100,7 @@ static char hu_tick; static tic_t hu_emoteanim = 0; emote_autocomplete_t emote_autocomplete = {0}; -static huddrawlist_h luahuddrawlist_scores; +static huddrawlist_h luahuddrawlist_scores = NULL; patch_t *rflagico = NULL; patch_t *bflagico = NULL; @@ -411,8 +411,10 @@ void HU_Init(void) // set shift translation table shiftxform = english_shiftxform; - luahuddrawlist_scores = LUA_HUD_CreateDrawList(); + if (dedicated || rendermode == render_none) + return; + luahuddrawlist_scores = LUA_HUD_CreateDrawList(); HU_LoadGraphics(); } diff --git a/src/y_inter.c b/src/y_inter.c index 3f8ff2429..8a105bfa3 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -780,14 +780,16 @@ void Y_StartIntermission(void) Y_CalculateMatchData(0, Y_CompareRace); break; } - case int_none: default: break; } - LUA_HUD_DestroyDrawList(luahuddrawlist_intermission); - luahuddrawlist_intermission = LUA_HUD_CreateDrawList(); + if (rendermode != render_none) + { + LUA_HUD_DestroyDrawList(luahuddrawlist_intermission); + luahuddrawlist_intermission = LUA_HUD_CreateDrawList(); + } } // ======