Normand Briere
2019-09-30 3966454055db8e04700e881a091c2d33dcfda232
GenericJoint.java
....@@ -177,7 +177,9 @@
177177
178178 public void spawnRagdoll(boolean walk) // random)
179179 {
180
- RagDoll ragDoll = new RagDoll(null, new Vector3f(0f, 0f, 0f), 0.45f, walk); // Math.random() > 0.5/*true*/); // true);
180
+ // KIDS4
181
+ RagDoll ragDoll = new RagDoll(null, new Vector3f(0f, 0f, 0f), 0.45f/2, walk, myzoffset = zoffset); // Math.random() > 0.5/*true*/); // true);
182
+ zoffset += 0.1f;
181183 ragdolls.add(ragDoll);
182184
183185 bRep = null;
....@@ -277,6 +279,8 @@
277279 //
278280 ObjectArrayList<Transform> initialmatrices;
279281
282
+ float myzoffset;
283
+
280284 void Reset()
281285 {
282286 // int numObjects = dynamicsWorld.getNumCollisionObjects();
....@@ -309,10 +313,12 @@
309313 walkdefined = true;
310314 }
311315
312
- ragdolls.get(0).init(/*staticdynamicsWorld,*/ new Vector3f(0f, 0f, 0f), 0.45f, walk);
316
+ ragdolls.get(0).init(/*staticdynamicsWorld,*/ new Vector3f(0f, 0f, 0f), ragdolls.get(0).scale, walk, myzoffset);
313317
314318 bRep = null;
315319 }
320
+
321
+ static float zoffset = 0;
316322
317323 void DrawNode(iCameraPane display, Object3D /*Composite*/ root, boolean selected) // ??
318324 {
....@@ -341,7 +347,7 @@
341347
342348 // assert(bRep != null);
343349
344
- if (Globals.isLIVE() && live && display.DrawMode() == display.SHADOW) // FUCK
350
+ if (Globals.isLIVE() && live && display.DrawMode() == display.SHADOW) // SHADOW
345351 {
346352 // float ms = getDeltaTimeMicroseconds();
347353 // float minFPS = 1000000f / 60f;
....@@ -381,7 +387,7 @@
381387 try
382388 {
383389 //font = FontRender.createFont("Dialog", 11, false, true);
384
- font = new FontRender.GLFont(gl, GrafreeD.class.getResourceAsStream("DejaVu_Sans_11.fnt"));
390
+ font = new FontRender.GLFont(gl, Grafreed.class.getResourceAsStream("DejaVu_Sans_11.fnt"));
385391 } catch (java.io.IOException e)
386392 {
387393 e.printStackTrace();
....@@ -486,7 +492,7 @@
486492
487493 tc.getFrameOffsetB(trans);
488494
489
- if (false) // c == 2) // DEBUG
495
+ if (false) //c == 8) // DEBUG
490496 {
491497 gl.glDisable(gl.GL_LIGHTING);
492498
....@@ -515,7 +521,7 @@
515521
516522 gl.glPopMatrix();
517523
518
- tc.getFrameOffsetB(trans);
524
+ //tc.getFrameOffsetB(trans);
519525
520526 gl.glColor3f(0, 1, 0);
521527
....@@ -557,7 +563,8 @@
557563 bRep.startvertices = new int[numObjects];
558564 bRep.averagepoints = new float[(bRep.startvertices.length-1) * 3];
559565 bRep.extremepoints = new float[(bRep.startvertices.length-1) * 3];
560
- bRep.supportsizes = new float[(bRep.startvertices.length-1)];
566
+ bRep.supportminsize = new float[(bRep.startvertices.length-1)];
567
+ bRep.supportmaxsize = new float[(bRep.startvertices.length-1)];
561568 buildrep = true;
562569
563570 initialmatrices = new ObjectArrayList<Transform>();
....@@ -1225,11 +1232,12 @@
12251232 }
12261233 else
12271234 {
1228
- if (bRep.averagepoints == null || bRep.extremepoints == null || bRep.supportsizes == null)
1235
+ if (bRep.averagepoints == null || bRep.extremepoints == null || bRep.supportminsize == null || bRep.supportmaxsize == null)
12291236 {
12301237 bRep.averagepoints = new float[(bRep.startvertices.length-1) * 3];
12311238 bRep.extremepoints = new float[(bRep.startvertices.length-1) * 3];
1232
- bRep.supportsizes = new float[(bRep.startvertices.length-1)];
1239
+ bRep.supportminsize = new float[(bRep.startvertices.length-1)];
1240
+ bRep.supportmaxsize = new float[(bRep.startvertices.length-1)];
12331241 }
12341242
12351243 float averagex = 0;
....@@ -1299,7 +1307,8 @@
12991307 }
13001308 }
13011309
1302
- bRep.supportsizes[currentobject-1] = (float)Math.sqrt(mindist2);
1310
+ bRep.supportminsize[currentobject-1] = (float)Math.sqrt(mindist2);
1311
+ bRep.supportmaxsize[currentobject-1] = (float)Math.sqrt(maxdist2);
13031312 }
13041313
13051314 // if (hull.numTriangles() > 0)