소스 검색

- fix PhysicsSpace.removeAll() recursion bug (same fix as for addAll)
Fixes Issue 349

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7456 75d07b2b-3a1a-0410-a2c5-0572b91ccdca

nor..67 14 년 전
부모
커밋
217eacde1e
2개의 변경된 파일2개의 추가작업 그리고 6개의 파일을 삭제
  1. 1 3
      engine/src/bullet/com/jme3/bullet/PhysicsSpace.java
  2. 1 3
      engine/src/jbullet/com/jme3/bullet/PhysicsSpace.java

+ 1 - 3
engine/src/bullet/com/jme3/bullet/PhysicsSpace.java

@@ -537,9 +537,7 @@ public class PhysicsSpace {
             List<Spatial> children = ((Node) spatial).getChildren();
             for (Iterator<Spatial> it = children.iterator(); it.hasNext();) {
                 Spatial spat = it.next();
-                if (spat instanceof Node) {
-                    removeAll((Node) spat);
-                }
+                removeAll((Node) spat);
             }
         }
     }

+ 1 - 3
engine/src/jbullet/com/jme3/bullet/PhysicsSpace.java

@@ -527,9 +527,7 @@ public class PhysicsSpace {
             List<Spatial> children = ((Node) spatial).getChildren();
             for (Iterator<Spatial> it = children.iterator(); it.hasNext();) {
                 Spatial spat = it.next();
-                if (spat instanceof Node) {
-                    removeAll((Node) spat);
-                }
+                removeAll((Node) spat);
             }
         }
     }