Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
alexey-lysiuk committed Aug 7, 2023
1 parent 5e2bc36 commit 52c7d80
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Quake/lua_script.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,14 @@ static void LS_PushFieldValue(lua_State* state, etype_t type, const char* name,
// return 3;
//}

// Pushes number of edicts
static int LS_EdictsCount(lua_State* state)
{
lua_pushinteger(state, sv.active ? sv.num_edicts : 0);
return 1;
}

// Pushes value of edict field by its name
static int LS_EdictIndex(lua_State* state)
{
luaL_checktype(state, 1, LUA_TTABLE);
Expand Down Expand Up @@ -249,6 +251,7 @@ static void LS_SetEdictMetaTable(lua_State* state)
lua_setmetatable(state, -2);
}

// Pushes edict table by its index, [0..num_edicts)
static int LS_EdictsIndex(lua_State* state)
{
luaL_checktype(state, 1, LUA_TTABLE);
Expand Down

0 comments on commit 52c7d80

Please sign in to comment.