diff --git a/core/src/mindustry/editor/MapView.java b/core/src/mindustry/editor/MapView.java index e030350238..0190b0081d 100644 --- a/core/src/mindustry/editor/MapView.java +++ b/core/src/mindustry/editor/MapView.java @@ -233,6 +233,9 @@ public class MapView extends Element implements GestureListener{ @Override public void draw(){ + //can cause NaN + if(editor.width() == 0 || editor.height() == 0) return; + float ratio = 1f / ((float)editor.width() / editor.height()); float size = Math.min(width, height); float sclwidth = size * zoom; diff --git a/core/src/mindustry/mod/DataImagePacker.java b/core/src/mindustry/mod/DataImagePacker.java index aeddc5aca5..4183d860bd 100644 --- a/core/src/mindustry/mod/DataImagePacker.java +++ b/core/src/mindustry/mod/DataImagePacker.java @@ -144,7 +144,6 @@ public class DataImagePacker{ packer.forceDispose(); - //getRegions is intentionally not modified, it's a hassle to manage, O(n) to unapply, and not used anywhere important. there's no point. //the drawable map isn't used, and thus not modified either