buttons_last -> lastbuttons

This commit is contained in:
Shane Ellis 2021-01-23 10:06:47 -05:00
parent ce8e389a2d
commit c391d76c11

View file

@ -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"))