Require valid toucher.player

This commit is contained in:
SMS Alfredo 2023-07-01 22:24:11 -05:00
parent 8afe510034
commit 2647b10840

View file

@ -2204,6 +2204,8 @@ static int lib_pTouchSpecialThing(lua_State *L)
INLEVEL
if (!special || !toucher)
return LUA_ErrInvalid(L, "mobj_t");
if (!toucher->player)
return luaL_error(L, "P_TouchSpecialThing requires a valid toucher.player.");
P_TouchSpecialThing(special, toucher, heightcheck);
return 0;
}