Sfoglia il codice sorgente

Fix infinite loop in terrain editor

ShiroSmith 6 anni fa
parent
commit
29c47c10ba
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      hide/prefab/terrain/TerrainEditor.hx

+ 3 - 0
hide/prefab/terrain/TerrainEditor.hx

@@ -545,6 +545,9 @@ class TerrainEditor {
 			previewStrokeBuffers();
 			return;
 		}
+
+		if( currentBrush == null || currentBrush.step <= 0 ) return;
+
 		var dist = (to.sub(from)).length();
 		if( dist + remainingDist >= currentBrush.step ) {
 			var dir = to.sub(from);