Ver Fonte

Fix crash on atlas loading with anim starting at 1 (#949)

Grégoire André há 4 anos atrás
pai
commit
c4b50b509d
1 ficheiros alterados com 5 adições e 5 exclusões
  1. 5 5
      hxd/res/Atlas.hx

+ 5 - 5
hxd/res/Atlas.hx

@@ -128,12 +128,12 @@ class Atlas extends Resource {
 				}
 				tl[index] = { t : t, width : origW, height : origH };
 			}
-
-			// remove first element if index started at 1 instead of 0
-			for( tl in contents )
-				if( tl.length > 1 && tl[0] == null ) tl.shift();
 		}
+
+		// remove first element if index started at 1 instead of 0
+		for( tl in contents )
+			if( tl.length > 1 && tl[0] == null ) tl.shift();
 		return contents;
 	}
 
-}
+}