- optimize BatchNode a bit

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9286 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 13 years ago
parent 0345dd9601
commit b7affd0147
  1. 6
      engine/src/core/com/jme3/scene/BatchNode.java

@ -238,9 +238,9 @@ public class BatchNode extends Node implements Savable {
List<Geometry> list = map.get(g.getMaterial());
if (list == null) {
//trying to compare materials with the isEqual method
for (Material mat : map.keySet()) {
if (g.getMaterial().isEqual(mat)) {
list = map.get(mat);
for ( Map.Entry<Material, List<Geometry>> mat : map.entrySet()) {
if (g.getMaterial().isEqual(mat.getKey())) {
list = mat.getValue();
}
}
}

Loading…
Cancel
Save