Clear and draw all game hud hook calls to 1 list

Fixes splitscreen issues with lua hud hooks
This commit is contained in:
Eidolon 2022-10-25 20:36:27 -05:00
parent 4e95aa92dd
commit cd3da06a92

View file

@ -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();