diff --git a/src/scenedit/scen.undo.cpp b/src/scenedit/scen.undo.cpp index 7f6bffcf..3d0ec7ec 100644 --- a/src/scenedit/scen.undo.cpp +++ b/src/scenedit/scen.undo.cpp @@ -65,6 +65,9 @@ void cTerrainAction::showChangeSite() { if(!((abs((short) (cen_x - area.where.x)) <=4) && (abs((short) (cen_y - area.where.y)) <= 4))){ cen_x = area.where.x; cen_y = area.where.y; + size_t max_dim = area.is_town ? town->max_dim : current_terrain->max_dim; + cen_x = minmax(4, max_dim - 5, cen_x); + cen_y = minmax(4, max_dim - 5, cen_y); } redraw_screen(); }