diff --git a/src/deh_tables.c b/src/deh_tables.c index cef433039..e901efd31 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -1382,6 +1382,10 @@ struct int_const_s const INT_CONST[] = { {"BASEVIDWIDTH", BASEVIDWIDTH}, {"BASEVIDHEIGHT", BASEVIDHEIGHT}, + // Custom client features exposed to lua + {"FEATURE_INTERMISSIONHUD",1}, // This is to trick kart luas that look for this since its already here. + {"FEATURE_VOTEHUD",1}, + {NULL,0} }; diff --git a/src/lua_hook.h b/src/lua_hook.h index 4d8d11c3d..5f4984850 100644 --- a/src/lua_hook.h +++ b/src/lua_hook.h @@ -95,6 +95,7 @@ automatically. X (title),/* titlescreen */\ X (titlecard),\ X (intermission),\ + X (vote),\ /* I chose to access the hook enums through a macro as well. This could provide diff --git a/src/y_inter.c b/src/y_inter.c index 01f36e2f3..e107fb282 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -128,6 +128,7 @@ intertype_t intertype = int_none; intertype_t intermissiontypes[NUMGAMETYPES]; static huddrawlist_h luahuddrawlist_intermission; +static huddrawlist_h luahuddrawlist_vote; static void Y_FollowIntermission(void); @@ -1450,6 +1451,13 @@ void Y_VoteDrawer(void) } lastvotetic = votetic; + + if (renderisnewtic) + { + LUA_HUD_ClearDrawList(luahuddrawlist_vote); + LUA_HookHUD(luahuddrawlist_vote, HUD_HOOK(vote)); + } + LUA_HUD_DrawList(luahuddrawlist_vote); } //