Merge branch 'splitscreen-hudhook-fix' into 'master'

Clear and draw all game hud hook calls to 1 list

See merge request KartKrew/Kart!741
This commit is contained in:
Eidolon 2022-10-26 03:05:03 +00:00
commit d6c21eeec1

View file

@ -1016,10 +1016,8 @@ static void ST_overlayDrawer(void)
if (renderisnewtic) if (renderisnewtic)
{ {
LUA_HUD_ClearDrawList(luahuddrawlist_game);
LUA_HookHUD(luahuddrawlist_game, HUD_HOOK(game)); LUA_HookHUD(luahuddrawlist_game, HUD_HOOK(game));
} }
LUA_HUD_DrawList(luahuddrawlist_game);
} }
if (!hu_showscores) // hide the following if TAB is held if (!hu_showscores) // hide the following if TAB is held
@ -1195,6 +1193,10 @@ void ST_Drawer(void)
if (st_overlay) if (st_overlay)
{ {
UINT8 i; UINT8 i;
if (renderisnewtic)
{
LUA_HUD_ClearDrawList(luahuddrawlist_game);
}
// No deadview! // No deadview!
for (i = 0; i <= r_splitscreen; i++) for (i = 0; i <= r_splitscreen; i++)
{ {
@ -1204,6 +1206,8 @@ void ST_Drawer(void)
ST_overlayDrawer(); ST_overlayDrawer();
} }
LUA_HUD_DrawList(luahuddrawlist_game);
// draw Midnight Channel's overlay ontop // draw Midnight Channel's overlay ontop
if (mapheaderinfo[gamemap-1]->typeoflevel & TOL_TV) // Very specific Midnight Channel stuff. if (mapheaderinfo[gamemap-1]->typeoflevel & TOL_TV) // Very specific Midnight Channel stuff.
ST_MayonakaStatic(); ST_MayonakaStatic();