Vote HUD Hook
This commit is contained in:
parent
96b13ab2cb
commit
79d8b6bf3f
3 changed files with 13 additions and 0 deletions
|
|
@ -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}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
|||
Loading…
Reference in a new issue