Add R_IsPointInSubsector to lua baselib
sample script:
addHook("MobjThinker", function(mobj)
local sub = R_IsPointInSubsector(mobj.x, mobj.y)
if (sub ~= nil) then
print("inside")
else
print("outside")
end
end, MT_PLAYER)
Edited by Lactozilla