Use Y_ItemListActive in Lua contexts
This commit is contained in:
parent
356f519039
commit
c9b3e5c45a
3 changed files with 17 additions and 14 deletions
|
|
@ -4374,7 +4374,9 @@ static int lib_kItemLitterActive(lua_State *L)
|
|||
|
||||
static int lib_kItemListActive(lua_State *L)
|
||||
{
|
||||
lua_pushboolean(L, K_ItemListActive());
|
||||
// Use the y_inter version so that Lua scripters don't have to do a
|
||||
// useless player headcount check.
|
||||
lua_pushboolean(L, Y_ItemListActive());
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -91,19 +91,6 @@ typedef struct
|
|||
boolean encore; // encore mode
|
||||
} y_data;
|
||||
|
||||
static boolean Y_ItemListActive(void)
|
||||
{
|
||||
UINT8 i = 0, nump = 0;
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (!playeringame[i] || players[i].spectator)
|
||||
continue;
|
||||
nump++;
|
||||
}
|
||||
|
||||
return ((itemlistactive) && (nump > 1));
|
||||
}
|
||||
|
||||
static y_data data;
|
||||
|
||||
// graphics
|
||||
|
|
@ -360,6 +347,19 @@ static void Y_CalculateMatchData(UINT8 rankingsmode, void (*comparison)(INT32))
|
|||
}
|
||||
}
|
||||
|
||||
boolean Y_ItemListActive(void)
|
||||
{
|
||||
UINT8 i = 0, nump = 0;
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (!playeringame[i] || players[i].spectator)
|
||||
continue;
|
||||
nump++;
|
||||
}
|
||||
|
||||
return ((itemlistactive) && (nump > 1));
|
||||
}
|
||||
|
||||
//
|
||||
// Y_ConsiderScreenBuffer
|
||||
//
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ extern "C" {
|
|||
|
||||
extern boolean usebuffer;
|
||||
|
||||
boolean Y_ItemListActive(void);
|
||||
void Y_IntermissionDrawer(void);
|
||||
void Y_Ticker(void);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue