diff --git a/src/lua_baselib.c b/src/lua_baselib.c index 944a4c486..fe7adecea 100644 --- a/src/lua_baselib.c +++ b/src/lua_baselib.c @@ -4730,6 +4730,16 @@ static int lib_kIsPlayingDisplayPlayer(lua_State *L) return 1; } +static int lib_kPlayerCanPunt(lua_State *L) +{ + player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER)); + INLEVEL + if (!player) + return LUA_ErrInvalid(L, "player_t"); + lua_pushboolean(L, K_PlayerCanPunt(player)); + return 1; +} + static int lib_kGetCollideAngle(lua_State *L) { mobj_t *t1 = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ)); @@ -5215,6 +5225,7 @@ static luaL_Reg lib[] = { {"K_Cooperative",lib_kCooperative}, {"K_isPlayerInSpecialState",lib_kIsPlayerInSpecialState}, {"K_IsPlayingDisplayPlayer",lib_kIsPlayingDisplayPlayer}, + {"K_PlayerCanPunt",lib_kPlayerCanPunt}, {"K_GetCollideAngle",lib_kGetCollideAngle}, {"K_AddHitLag",lib_kAddHitLag},