- 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
This commit is contained in:
parent
6b537307fd
commit
217eacde1e
@ -537,12 +537,10 @@ public class PhysicsSpace {
|
|||||||
List<Spatial> children = ((Node) spatial).getChildren();
|
List<Spatial> children = ((Node) spatial).getChildren();
|
||||||
for (Iterator<Spatial> it = children.iterator(); it.hasNext();) {
|
for (Iterator<Spatial> it = children.iterator(); it.hasNext();) {
|
||||||
Spatial spat = it.next();
|
Spatial spat = it.next();
|
||||||
if (spat instanceof Node) {
|
|
||||||
removeAll((Node) spat);
|
removeAll((Node) spat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private native void addCollisionObject(long space, long id);
|
private native void addCollisionObject(long space, long id);
|
||||||
|
|
||||||
|
@ -527,12 +527,10 @@ public class PhysicsSpace {
|
|||||||
List<Spatial> children = ((Node) spatial).getChildren();
|
List<Spatial> children = ((Node) spatial).getChildren();
|
||||||
for (Iterator<Spatial> it = children.iterator(); it.hasNext();) {
|
for (Iterator<Spatial> it = children.iterator(); it.hasNext();) {
|
||||||
Spatial spat = it.next();
|
Spatial spat = it.next();
|
||||||
if (spat instanceof Node) {
|
|
||||||
removeAll((Node) spat);
|
removeAll((Node) spat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void addGhostObject(PhysicsGhostObject node) {
|
private void addGhostObject(PhysicsGhostObject node) {
|
||||||
Logger.getLogger(PhysicsSpace.class.getName()).log(Level.INFO, "Adding ghost object {0} to physics space.", node.getObjectId());
|
Logger.getLogger(PhysicsSpace.class.getName()).log(Level.INFO, "Adding ghost object {0} to physics space.", node.getObjectId());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user