From ce8e389a2d9cec8c36f43a9573f0d9a29bf50d18 Mon Sep 17 00:00:00 2001 From: Shane Ellis Date: Sat, 23 Jan 2021 09:49:57 -0500 Subject: [PATCH] Add lua player.botleader and player.buttons_last (read+write) --- src/lua_playerlib.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lua_playerlib.c b/src/lua_playerlib.c index 0eb54808f..a8dc64a15 100644 --- a/src/lua_playerlib.c +++ b/src/lua_playerlib.c @@ -370,6 +370,10 @@ static int player_get(lua_State *L) lua_pushboolean(L, plr->outofcoop); else if (fastcmp(field,"bot")) 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,"jointime")) lua_pushinteger(L, plr->jointime); else if (fastcmp(field,"quittime"))