diff --git a/core/src/mindustry/editor/MapRenderer.java b/core/src/mindustry/editor/MapRenderer.java index 7c6a28db6f..a1c3d8a933 100644 --- a/core/src/mindustry/editor/MapRenderer.java +++ b/core/src/mindustry/editor/MapRenderer.java @@ -100,6 +100,7 @@ public class MapRenderer implements Disposable{ private void render(int wx, int wy){ int x = wx / chunkSize, y = wy / chunkSize; + if(x >= chunks.length || y >= chunks[0].length) return; IndexedRenderer mesh = chunks[x][y]; Tile tile = editor.tiles().getn(wx, wy); diff --git a/core/src/mindustry/editor/MapView.java b/core/src/mindustry/editor/MapView.java index 4299472501..dd1c447f61 100644 --- a/core/src/mindustry/editor/MapView.java +++ b/core/src/mindustry/editor/MapView.java @@ -184,12 +184,12 @@ public class MapView extends Element implements GestureListener{ offsety -= ay * 15 * Time.delta / zoom; } - if(Core.input.keyTap(KeyCode.shiftLeft)){ + if(Core.input.keyTap(KeyCode.shiftLeft) || Core.input.keyTap(KeyCode.altLeft)){ lastTool = tool; tool = EditorTool.pick; } - if(Core.input.keyRelease(KeyCode.shiftLeft) && lastTool != null){ + if((Core.input.keyRelease(KeyCode.shiftLeft) || Core.input.keyRelease(KeyCode.altLeft)) && lastTool != null){ tool = lastTool; lastTool = null; }