diff --git a/src/lua_polyobjlib.c b/src/lua_polyobjlib.c index 85cb8fc69..4b583be26 100644 --- a/src/lua_polyobjlib.c +++ b/src/lua_polyobjlib.c @@ -21,6 +21,7 @@ enum polyobj_e { polyobj_valid = 0, polyobj_id, polyobj_parent, + polyobj_sector, polyobj_angle, polyobj_damage, polyobj_thrust, @@ -32,6 +33,7 @@ static const char *const polyobj_opt[] = { "valid", "id", "parent", + "sector", "angle", "damage", "thrust", @@ -64,6 +66,9 @@ static int polyobj_get(lua_State *L) case polyobj_parent: lua_pushinteger(L, polyobj->parent); break; + case polyobj_sector: // shortcut that exists only in Lua! + LUA_PushUserdata(L, polyobj->lines[0]->backsector, META_SECTOR); + break; case polyobj_angle: lua_pushangle(L, polyobj->angle); break;