mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-09-22 13:01:12 +03:00
Fixed NaN black screen
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user