From cd3da06a926bfa9b380725afe9fbe9d700acc500 Mon Sep 17 00:00:00 2001 From: Eidolon Date: Tue, 25 Oct 2022 20:36:27 -0500 Subject: [PATCH] Clear and draw all game hud hook calls to 1 list Fixes splitscreen issues with lua hud hooks --- src/st_stuff.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/st_stuff.c b/src/st_stuff.c index d46da54b5..f0aa0c4a6 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -1016,10 +1016,8 @@ static void ST_overlayDrawer(void) if (renderisnewtic) { - LUA_HUD_ClearDrawList(luahuddrawlist_game); LUA_HookHUD(luahuddrawlist_game, HUD_HOOK(game)); } - LUA_HUD_DrawList(luahuddrawlist_game); } if (!hu_showscores) // hide the following if TAB is held @@ -1195,6 +1193,10 @@ void ST_Drawer(void) if (st_overlay) { UINT8 i; + if (renderisnewtic) + { + LUA_HUD_ClearDrawList(luahuddrawlist_game); + } // No deadview! for (i = 0; i <= r_splitscreen; i++) { @@ -1204,6 +1206,8 @@ void ST_Drawer(void) ST_overlayDrawer(); } + LUA_HUD_DrawList(luahuddrawlist_game); + // draw Midnight Channel's overlay ontop if (mapheaderinfo[gamemap-1]->typeoflevel & TOL_TV) // Very specific Midnight Channel stuff. ST_MayonakaStatic();