Expose followerready, match d_player.h organization

This commit is contained in:
wolfy852 2019-05-11 02:13:31 -05:00
parent 5d7b7afd17
commit f1a9426100

View file

@ -154,6 +154,12 @@ static int player_get(lua_State *L)
lua_pushinteger(L, plr->kartspeed);
else if (fastcmp(field,"kartweight"))
lua_pushinteger(L, plr->kartweight);
else if (fastcmp(field,"followerskin"))
lua_pushinteger(L, plr->followerskin);
else if (fastcmp(field,"followerready"))
lua_pushboolean(L, plr->followerready);
else if (fastcmp(field,"follower"))
LUA_PushUserdata(L, plr->follower, META_MOBJ);
//
else if (fastcmp(field,"normalspeed"))
lua_pushfixed(L, plr->normalspeed);
@ -319,10 +325,7 @@ static int player_get(lua_State *L)
lua_pushinteger(L, plr->awayviewtics);
else if (fastcmp(field,"awayviewaiming"))
lua_pushangle(L, plr->awayviewaiming);
else if (fastcmp(field,"follower"))
LUA_PushUserdata(L, plr->follower, META_MOBJ);
else if (fastcmp(field,"followerskin"))
lua_pushinteger(L, plr->followerskin);
else if (fastcmp(field,"spectator"))
lua_pushboolean(L, plr->spectator);
else if (fastcmp(field,"bot"))
@ -434,6 +437,12 @@ static int player_set(lua_State *L)
plr->kartspeed = (UINT8)luaL_checkinteger(L, 3);
else if (fastcmp(field,"kartweight"))
plr->kartweight = (UINT8)luaL_checkinteger(L, 3);
else if (fastcmp(field,"followerskin"))
plr->followerskin = luaL_checkinteger(L, 3);
else if (fastcmp(field,"followerready"))
plr->followerready = luaL_checkboolean(L, 3);
else if (fastcmp(field,"follower")) // it's probably best we don't allow the follower mobj to change.
return NOSET;
//
else if (fastcmp(field,"normalspeed"))
plr->normalspeed = luaL_checkfixed(L, 3);
@ -613,10 +622,6 @@ static int player_set(lua_State *L)
}
else if (fastcmp(field,"awayviewaiming"))
plr->awayviewaiming = luaL_checkangle(L, 3);
else if (fastcmp(field,"follower")) // it's probably best we don't allow the follower mobj to change.
return NOSET;
else if (fastcmp(field,"followerskin"))
plr->followerskin = luaL_checkinteger(L, 3);
else if (fastcmp(field,"spectator"))
plr->spectator = lua_toboolean(L, 3);
else if (fastcmp(field,"bot"))