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