From 534766df401bc1f36bb9f8eb118f8452293e4247 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Mon, 16 Jul 2018 18:11:35 -0400 Subject: [PATCH] Expose P_SpawnShadowMobj --- src/lua_baselib.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/lua_baselib.c b/src/lua_baselib.c index 49205ad7..dce8262f 100644 --- a/src/lua_baselib.c +++ b/src/lua_baselib.c @@ -583,6 +583,16 @@ static int lib_pCanRunOnWater(lua_State *L) return 1; } +static int lib_pSpawnShadowMobj(lua_State *L) +{ + mobj_t *caster = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ)); + NOHUD + if (!caster) + return LUA_ErrInvalid(L, "mobj_t"); + P_SpawnShadowMobj(caster); + return 0; +} + // P_USER //////////// @@ -2271,6 +2281,7 @@ static luaL_Reg lib[] = { {"P_CheckDeathPitCollide",lib_pCheckDeathPitCollide}, {"P_CheckSolidLava",lib_pCheckSolidLava}, {"P_CanRunOnWater",lib_pCanRunOnWater}, + {"P_SpawnShadowMobj",lib_pSpawnShadowMobj}, // p_user {"P_GetPlayerHeight",lib_pGetPlayerHeight},