- add workaround for bugged TerrainGrid test data

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8691 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 13 years ago
parent 77d35acb22
commit 2327e2303d
  1. 4
      engine/src/test/jme3test/terrain/TerrainFractalGridTest.java
  2. 4
      engine/src/test/jme3test/terrain/TerrainQuadGridSerializationTest.java

@ -184,6 +184,10 @@ public class TerrainFractalGridTest extends SimpleApplication {
// } catch (IOException ex) {
// Logger.getLogger(TerrainFractalGridTest.class.getName()).log(Level.SEVERE, null, ex);
// }
//workaround for bugged test j3o's
while(quad.getControl(RigidBodyControl.class)!=null){
quad.removeControl(RigidBodyControl.class);
}
quad.addControl(new RigidBodyControl(new HeightfieldCollisionShape(quad.getHeightMap(), terrain.getLocalScale()), 0));
bulletAppState.getPhysicsSpace().add(quad);
}

@ -82,6 +82,10 @@ public class TerrainQuadGridSerializationTest extends SimpleApplication {
}
public void tileAttached(Vector3f cell, TerrainQuad quad) {
//workaround for bugged test j3o's
while(quad.getControl(RigidBodyControl.class)!=null){
quad.removeControl(RigidBodyControl.class);
}
quad.addControl(new RigidBodyControl(new HeightfieldCollisionShape(quad.getHeightMap(), terrain.getLocalScale()), 0));
bulletAppState.getPhysicsSpace().add(quad);
}

Loading…
Cancel
Save