Merge branch 'lua-k-stumbleplayer' into 'master'

Add K_StumblePlayer to Lua

Closes #315

See merge request KartKrew/Kart!742
This commit is contained in:
James R 2022-10-29 03:55:13 +00:00
commit 4479682c19

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},