diff --git a/game/engines/default/engine/generator/map/Static.lua b/game/engines/default/engine/generator/map/Static.lua index 92469c652b2230d3ce9b2dad1a52f53352366f2e..b66bab29dad4ac94e55efc5bfc6ec165e8670e48 100644 --- a/game/engines/default/engine/generator/map/Static.lua +++ b/game/engines/default/engine/generator/map/Static.lua @@ -22,6 +22,8 @@ local Map = require "engine.Map" require "engine.Generator" module(..., package.seeall, class.inherit(engine.Generator)) +auto_handle_spot_offsets = true + function _M:init(zone, map, level, data) engine.Generator.init(self, zone, map, level) self.grid_list = zone.grid_list @@ -299,6 +301,13 @@ function _M:generate(lev, old_lev) self.map:import(map, g.x, g.y) end + if not generator.auto_handle_spot_offsets then + for spot in ipairs(subspots) do + spot.x = spot.x + data.__import_offset_x + spot.y = spot.y + data.__import_offset_y + end + end + table.append(self.spots, subspots) if g.define_up then self.gen_map.startx, self.gen_map.starty = ux + self.data.__import_offset_x+g.x, uy + self.data.__import_offset_y+g.y end