Add K_StumblePlayer to Lua

This commit is contained in:
James R 2022-10-26 22:23:01 -07:00
parent 0978093a2b
commit eb96624c71

View file

@ -3539,6 +3539,16 @@ static int lib_kTumblePlayer(lua_State *L)
return 0;
}
static int lib_kStumblePlayer(lua_State *L)
{
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
NOHUD
if (!player)
return LUA_ErrInvalid(L, "player_t");
K_StumblePlayer(player);
return 0;
}
static int lib_kExplodePlayer(lua_State *L)
{
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
@ -4099,6 +4109,7 @@ static luaL_Reg lib[] = {
{"K_SpawnBattlePoints",lib_kSpawnBattlePoints},
{"K_SpinPlayer",lib_kSpinPlayer},
{"K_TumblePlayer",lib_kTumblePlayer},
{"K_StumblePlayer",lib_kStumblePlayer},
{"K_ExplodePlayer",lib_kExplodePlayer},
{"K_TakeBumpersFromPlayer",lib_kTakeBumpersFromPlayer},
{"K_SpawnMineExplosion",lib_kSpawnMineExplosion},