Skip to content
Snippets Groups Projects
Commit c391d76c authored by Claire Ellis's avatar Claire Ellis :speech_balloon:
Browse files

buttons_last -> lastbuttons

parent ce8e389a
No related branches found
No related tags found
No related merge requests found
......@@ -372,8 +372,8 @@ static int player_get(lua_State *L)
lua_pushinteger(L, plr->bot);
else if (fastcmp(field,"botleader"))
LUA_PushUserdata(L, plr->botleader, META_PLAYER);
else if (fastcmp(field,"buttons_last"))
lua_pushinteger(L, plr->buttons_last);
else if (fastcmp(field,"lastbuttons"))
lua_pushinteger(L, plr->lastbuttons);
else if (fastcmp(field,"jointime"))
lua_pushinteger(L, plr->jointime);
else if (fastcmp(field,"quittime"))
......@@ -723,6 +723,15 @@ static int player_set(lua_State *L)
plr->outofcoop = lua_toboolean(L, 3);
else if (fastcmp(field,"bot"))
return NOSET;
else if (fastcmp(field,"botleader"))
{
player_t *player = NULL;
if (!lua_isnil(L, 3))
player = *((player_t **)luaL_checkudata(L, 3, META_PLAYER));
plr->botleader = player;
}
else if (fastcmp(field,"lastbuttons"))
plr->lastbuttons = (UINT16)luaL_checkinteger(L, 3);
else if (fastcmp(field,"jointime"))
plr->jointime = (tic_t)luaL_checkinteger(L, 3);
else if (fastcmp(field,"quittime"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment