Normand Briere
2019-06-03 e24558ddeacfc945b9e9ba0a32b552d04e2ed4dd
Mocap.java
....@@ -261,9 +261,9 @@
261261
262262 // LA.matConcat(toParent, hip.get(0).toParent, toParent);
263263
264
- CameraPane.debugpoint.toParent[3][0] = poship.x;
265
- CameraPane.debugpoint.toParent[3][1] = poship.y;
266
- CameraPane.debugpoint.toParent[3][2] = poship.z;
264
+ CameraPane.debugpointG.toParent[3][0] = poship.x;
265
+ CameraPane.debugpointG.toParent[3][1] = poship.y;
266
+ CameraPane.debugpointG.toParent[3][2] = poship.z;
267267
268268 LA.matInvert(toParent, fromParent);
269269
....@@ -283,28 +283,28 @@
283283 poship.x = hip.get(0).toParent[3][0];
284284 poship.y = hip.get(0).toParent[3][1];
285285 poship.z = hip.get(0).toParent[3][2];
286
+
287
+ temp.x = 1;
288
+ temp.y = 0;
289
+ temp.z = 0;
290
+
291
+ LA.xformDir(temp, hip.get(0).toParent, temp);
292
+
293
+ angleYhip = Math.atan2(-temp.z, temp.x);
286294
287
- // AT*AR = A'T*BT*A'R*BR
288
- //
289
- LA.matInvert(hip.get(0).toParent, matrix);
295
+ LA.matIdentity(matrix);
296
+ LA.matYRotate(matrix, angleYhip);
297
+ LA.matTranslate(matrix, poship.x, poship.y, poship.z);
298
+
299
+ //LA.matInvert(hip.get(0).toParent, matrix);
300
+ LA.matInvert(matrix, matrix);
290301
291302 //LA.matIdentity(matrix);
292303 //LA.matTranslate(matrix, -poship.x, -poship.y, -poship.z);
293304
294305 LA.matConcat(toParent, matrix, toParent);
295306
296
-// poship.x = hip.get(0).toParent[3][0];
297
-// poship.y = hip.get(0).toParent[3][1];
298
-// poship.z = hip.get(0).toParent[3][2];
299
-//
300
-// temp.x = 1;
301
-// temp.y = 0;
302
-// temp.z = 0;
303
-//
304
-// LA.xformDir(temp, hip.get(0).toParent, temp);
305
-//
306
-// angleYhip = Math.atan2(-temp.z, temp.x);
307
-
307
+
308308 LA.matConcat(toParent, hip.get(0).toParent, matrix);
309309 pos.x = hip.get(0).toParent[3][0];
310310 pos.y = hip.get(0).toParent[3][1];
....@@ -324,21 +324,21 @@
324324 // LA.matYRotate(toParent, angleY - angleYhip);
325325 // LA.matTranslate(toParent, pos.x - poship.x, pos.y - poship.y, pos.z - poship.z);
326326
327
- CameraPane.debugpoint2.toParent[3][0] = pos.x;
328
- CameraPane.debugpoint2.toParent[3][1] = pos.y;
329
- CameraPane.debugpoint2.toParent[3][2] = pos.z;
327
+ CameraPane.debugpointP.toParent[3][0] = pos.x;
328
+ CameraPane.debugpointP.toParent[3][1] = pos.y;
329
+ CameraPane.debugpointP.toParent[3][2] = pos.z;
330330
331
- CameraPane.debugpoint3.toParent[3][0] = poship.x;
332
- CameraPane.debugpoint3.toParent[3][1] = poship.y;
333
- CameraPane.debugpoint3.toParent[3][2] = poship.z;
331
+ CameraPane.debugpointC.toParent[3][0] = poship.x;
332
+ CameraPane.debugpointC.toParent[3][1] = poship.y;
333
+ CameraPane.debugpointC.toParent[3][2] = poship.z;
334334
335335 poship.x = toParent[3][0];
336336 poship.y = toParent[3][1];
337337 poship.z = toParent[3][2];
338338
339
- CameraPane.debugpoint4.toParent[3][0] = poship.x;
340
- CameraPane.debugpoint4.toParent[3][1] = poship.y;
341
- CameraPane.debugpoint4.toParent[3][2] = poship.z;
339
+ CameraPane.debugpointR.toParent[3][0] = poship.x;
340
+ CameraPane.debugpointR.toParent[3][1] = poship.y;
341
+ CameraPane.debugpointR.toParent[3][2] = poship.z;
342342
343343 LA.matInvert(toParent, fromParent);
344344 }
....@@ -476,6 +476,124 @@
476476 currenthip[i] = data[frame3 + i];
477477 }
478478 }
479
+
480
+ static cVector centroid = new cVector();
481
+ static cVector mocaporigin = new cVector();
482
+
483
+ void SetHipOrientation()
484
+ {
485
+ Object3D hip = get(0);
486
+
487
+ if (toParent == null)
488
+ {
489
+ toParent = LA.newMatrix();
490
+ fromParent = LA.newMatrix();
491
+ }
492
+
493
+ LA.matConcat(toParent, hip.get(0).toParent, matrix);
494
+
495
+ mocaporigin.x = matrix[3][0];
496
+ mocaporigin.y = matrix[3][1];
497
+ mocaporigin.z = matrix[3][2];
498
+
499
+ centroid.x = matrix[3][0];
500
+ centroid.y = matrix[3][1];
501
+ centroid.z = matrix[3][2];
502
+// this.getCentroid(centroid, true);
503
+
504
+ CameraPane.debugpointG.name = "";
505
+ CameraPane.debugpointG.toParent[3][0] = mocaporigin.x;
506
+ CameraPane.debugpointG.toParent[3][1] = mocaporigin.y;
507
+ CameraPane.debugpointG.toParent[3][2] = mocaporigin.z;
508
+
509
+ CameraPane.debugpointP.name = "";
510
+ CameraPane.debugpointP.toParent[3][0] = centroid.x;
511
+ CameraPane.debugpointP.toParent[3][1] = centroid.y;
512
+ CameraPane.debugpointP.toParent[3][2] = centroid.z;
513
+
514
+ cVector goal = GetGoal(centroid);
515
+ if (goal != null)
516
+ {
517
+ System.err.println("GOAL change (" + this + "): " + goal + " (was " + goalposx + ", " + goalposz + ")");
518
+
519
+ goalposx = goal.x;
520
+ goalposz = goal.z;
521
+ targetdirx = targetdirz = 0;
522
+ }
523
+
524
+ if (goalposx == 0 && goalposz == 0)
525
+ {
526
+ // No target
527
+ if (ScriptNode.speaker != null)
528
+ {
529
+ Object3D sourcenode = GetFileRoot();
530
+ Object3D speakernode = ScriptNode.speaker.GetFileRoot();
531
+
532
+ //System.err.println("speaker is " + speakernode + "; last was " + ScriptNode.lastspeaker);
533
+
534
+ Object3D speaker = ScriptNode.speaker;
535
+
536
+ if (speakernode == sourcenode)
537
+ {
538
+ if (ScriptNode.lastspeaker != null)
539
+ {
540
+ speakernode = ScriptNode.lastspeaker.GetFileRoot();
541
+ speaker = ScriptNode.lastspeaker;
542
+ }
543
+ else
544
+ return;
545
+ }
546
+
547
+ cVector dst = new cVector();
548
+
549
+ boolean success = speakernode.getCentroid(dst); // , true);
550
+
551
+ if (!success)
552
+ new Exception().printStackTrace();
553
+
554
+ //speakernode.parent.TransformToWorld(dst);
555
+ //sourcenode.parent.TransformToLocal(dst);
556
+ this.parent.TransformToLocal(dst);
557
+
558
+ goalposx = dst.x;
559
+ goalposz = dst.z;
560
+ }
561
+ else
562
+ return;
563
+ }
564
+
565
+ cVector temp = new cVector();
566
+
567
+ temp.x = 1;
568
+ temp.y = 0;
569
+ temp.z = 0;
570
+
571
+ LA.xformDir(temp, matrix, temp);
572
+
573
+ double angleYhip = Math.atan2(-temp.z, temp.x);
574
+
575
+ double angleYtarget = Math.atan2(goalposx - centroid.x, goalposz - centroid.z);
576
+
577
+ LA.matIdentity(matrix);
578
+ LA.matTranslate(matrix, -centroid.x, -centroid.y, -centroid.z);
579
+ double angle = CurveAngle(0, angleYtarget - angleYhip, 0.1f);
580
+ LA.matYRotate(matrix, angle);
581
+ LA.matTranslate(matrix, centroid.x, centroid.y, centroid.z);
582
+
583
+ LA.matConcat(matrix, toParent, toParent);
584
+
585
+ LA.matInvert(toParent, fromParent);
586
+
587
+ LA.matConcat(toParent, hip.get(0).toParent, matrix);
588
+
589
+ centroid.x = matrix[3][0];
590
+ centroid.y = matrix[3][1];
591
+ centroid.z = matrix[3][2];
592
+
593
+ double dist = LA.distance(centroid, mocaporigin);
594
+
595
+ CheckForAction(centroid);
596
+ }
479597
480598 void WriteTo(java.io.Writer writer) throws Exception
481599 {
....@@ -549,11 +667,11 @@
549667 double pinx;
550668 double pinz;
551669
552
- double targetx;
553
- double targetz;
670
+ double targetdirx;
671
+ double targetdirz;
554672
555
- double goalx;
556
- double goalz;
673
+ double goalposx = 0; // -20;
674
+ double goalposz = 0; // -10;
557675
558676 boolean followpath;
559677
....@@ -624,7 +742,7 @@
624742 scriptactions.clear();
625743 }
626744
627
- static double EPSACTION = 0.1; // 0.075; // 0.1;
745
+ static double EPSACTION = 0.1; // 0.075; // 0.1;Came
628746
629747 void AddFromTo(cVector from, cVector to)
630748 {
....@@ -809,7 +927,7 @@
809927 // //GetFileRoot();
810928
811929 // sept 2014: //
812
- GrafreeD.RENDERME = 3; // patch for Merge objects
930
+ Grafreed.RENDERME = 3; // patch for Merge objects
813931 float[] thedata = bvh.animation.getBoneData(0);
814932
815933 os.x = (float) (path.get(i).toParent[3][0]); // - thedata[frame*6]);
....@@ -910,6 +1028,8 @@
9101028 testvect.set(from);
9111029 testvect.sub(fromto.from);
9121030
1031
+ testvect.y = 0; // PATCH
1032
+
9131033 int factor = 1;
9141034
9151035 //if (CameraPane.FAST)
....@@ -951,6 +1071,8 @@
9511071
9521072 testvect.set(from);
9531073 testvect.sub(fromto.from);
1074
+
1075
+ testvect.y = 0; // PATCH
9541076
9551077 int factor = 1;
9561078
....@@ -1186,6 +1308,7 @@
11861308
11871309 void SetPosition(Object3D sourcenode, cVector floor, long floorid, cVector centroid)
11881310 {
1311
+ assert(false);
11891312 //assert(CameraPane.drawMode == CameraPane.SHADOW);
11901313
11911314 Object3D transformnode = new Object3D();
....@@ -1389,9 +1512,9 @@
13891512 groundid = floorid;
13901513
13911514 // green
1392
- CameraPane.debugpoint.toParent[3][0] = groundx;
1393
- CameraPane.debugpoint.toParent[3][1] = floor.y;
1394
- CameraPane.debugpoint.toParent[3][2] = groundz;
1515
+ CameraPane.debugpointG.toParent[3][0] = groundx;
1516
+ CameraPane.debugpointG.toParent[3][1] = floor.y;
1517
+ CameraPane.debugpointG.toParent[3][2] = groundz;
13951518
13961519 if (true) // slow && stepout && onein)
13971520 {
....@@ -1402,7 +1525,7 @@
14021525 // mywave = currentwave++;
14031526 // }
14041527 // sound
1405
- cVector eye = CameraPane.theRenderer.eyeCamera.location;
1528
+ cVector eye = Globals.theRenderer.EyeCamera().location;
14061529
14071530 // if (sourcenode.parent.parent != null)
14081531 // sourcenode.parent.parent.TransformToWorld(floor, tmp);
....@@ -1447,9 +1570,9 @@
14471570 //GraphreeD.
14481571 wav.play(volume * usedvolume); //, mywave);
14491572
1450
- lastsoundtime = CameraPane.framecount;
1573
+ lastsoundtime = Globals.framecount;
14511574
1452
- GrafreeD.hassound = true;
1575
+ Grafreed.hassound = true;
14531576 }
14541577 // else
14551578 // System.out.println("skipped");
....@@ -1468,9 +1591,9 @@
14681591
14691592 // System.out.println("Allo " + sourcenode);
14701593 // purple
1471
- CameraPane.debugpoint2.toParent[3][0] = floor.x;// + posx;
1472
- CameraPane.debugpoint2.toParent[3][1] = ground; // floor.y;// + sourcenode.parent.toParent[3][1];
1473
- CameraPane.debugpoint2.toParent[3][2] = floor.z;// + posz;
1594
+ CameraPane.debugpointP.toParent[3][0] = floor.x;// + posx;
1595
+ CameraPane.debugpointP.toParent[3][1] = ground; // floor.y;// + sourcenode.parent.toParent[3][1];
1596
+ CameraPane.debugpointP.toParent[3][2] = floor.z;// + posz;
14741597
14751598
14761599 if (false) // dist2 > 0.1)
....@@ -1536,9 +1659,9 @@
15361659 this.get(0).TransformToWorld(v0);
15371660
15381661 // cyan
1539
- CameraPane.debugpoint3.toParent[3][0] = v0.x;
1540
- CameraPane.debugpoint3.toParent[3][1] = ground;
1541
- CameraPane.debugpoint3.toParent[3][2] = v0.z;
1662
+ CameraPane.debugpointC.toParent[3][0] = v0.x;
1663
+ CameraPane.debugpointC.toParent[3][1] = ground;
1664
+ CameraPane.debugpointC.toParent[3][2] = v0.z;
15421665
15431666 LA.matConcat(sourcenode.toParent, transformnode.toParent, sourcenode.toParent);
15441667 LA.matInvert(sourcenode.toParent, sourcenode.fromParent);
....@@ -1548,9 +1671,9 @@
15481671 this.get(0).TransformToWorld(v0);
15491672
15501673 // red
1551
- CameraPane.debugpoint4.toParent[3][0] = v0.x;
1552
- CameraPane.debugpoint4.toParent[3][1] = ground;
1553
- CameraPane.debugpoint4.toParent[3][2] = v0.z;
1674
+ CameraPane.debugpointR.toParent[3][0] = v0.x;
1675
+ CameraPane.debugpointR.toParent[3][1] = ground;
1676
+ CameraPane.debugpointR.toParent[3][2] = v0.z;
15541677 }
15551678 }
15561679
....@@ -1590,11 +1713,11 @@
15901713
15911714 if (goal != null)
15921715 {
1593
- System.err.println("GOAL change (" + sourcenode + "): " + goal + " (was " + goalx + ", " + goalz + ")");
1716
+ System.err.println("GOAL change (" + sourcenode + "): " + goal + " (was " + goalposx + ", " + goalposz + ")");
15941717 //sourcenode.parent.parent.Dump();
1595
- goalx = goal.x;
1596
- goalz = goal.z;
1597
- targetx = targetz = 0;
1718
+ goalposx = goal.x;
1719
+ goalposz = goal.z;
1720
+ targetdirx = targetdirz = 0;
15981721
15991722 followpath = true;
16001723 }
....@@ -1645,16 +1768,16 @@
16451768 // }
16461769 if (false) // !uselast)
16471770 {
1648
- CameraPane.debugpoint.toParent[3][0] = dst.x;
1649
- CameraPane.debugpoint.toParent[3][1] = dst.y;
1650
- CameraPane.debugpoint.toParent[3][2] = dst.z;
1771
+ CameraPane.debugpointG.toParent[3][0] = dst.x;
1772
+ CameraPane.debugpointG.toParent[3][1] = dst.y;
1773
+ CameraPane.debugpointG.toParent[3][2] = dst.z;
16511774 }
16521775 }
16531776
1654
- if (goalx != 0 || goalz != 0) // TODO
1777
+ if (goalposx != 0 || goalposz != 0) // TODO
16551778 {
16561779 // overwrite speaker orientation
1657
- dst.set(goalx,0,goalz);
1780
+ dst.set(goalposx,0,goalposz);
16581781 if (sourcenode.parent != null) // july 2014
16591782 sourcenode.parent.
16601783 TransformToLocal(dst);
....@@ -1706,26 +1829,26 @@
17061829 // mars 2014
17071830 if (false) // goalx != 0 || goalz != 0)
17081831 {
1709
- targetx = dst.x - src.x;
1710
- targetz = dst.z - src.z;
1832
+ targetdirx = dst.x - src.x;
1833
+ targetdirz = dst.z - src.z;
17111834
1712
- if (Math.abs(targetx) > 0.1 || Math.abs(targetz) > 0.1)
1835
+ if (Math.abs(targetdirx) > 0.1 || Math.abs(targetdirz) > 0.1)
17131836 {
17141837 // far enough from goal. keep the goal position.
1715
- targetx = 0;
1716
- targetz = 0;
1838
+ targetdirx = 0;
1839
+ targetdirz = 0;
17171840 }
17181841 else
17191842 {
17201843 // too close to goal. switch to target direction instead.
1721
- goalx = 0;
1722
- goalz = 0;
1844
+ goalposx = 0;
1845
+ goalposz = 0;
17231846 }
17241847 }
17251848
17261849 //sourcenode.getCentroid(src, true);
17271850
1728
- if (speakernode == sourcenode && goalx == 0 && goalz == 0)
1851
+ if (speakernode == sourcenode && goalposx == 0 && goalposz == 0)
17291852 {
17301853 if (ScriptNode.lastspeaker != null)
17311854 new Exception().printStackTrace();
....@@ -1734,13 +1857,13 @@
17341857
17351858 // LA.xformPos(src, fromParent, src);
17361859
1737
- if ((ScriptNode.speaker != null && CameraPane.SPEAKERMOCAP || goalx != 0 || goalz != 0) && targetx == 0 && targetz == 0)
1860
+ if ((ScriptNode.speaker != null && CameraPane.SPEAKERMOCAP || goalposx != 0 || goalposz != 0) && targetdirx == 0 && targetdirz == 0)
17381861 dst.sub(src);
17391862 else
17401863 // vector mode
17411864 {
1742
- dst.x = targetx;
1743
- dst.z = targetz;
1865
+ dst.x = targetdirx;
1866
+ dst.z = targetdirz;
17441867
17451868 // TEST TARGET
17461869 // dst.x = CameraPane.selectedpoint.toParent[3][0];
....@@ -2150,7 +2273,7 @@
21502273 }
21512274
21522275 if (!smoothed)
2153
- for (int i=0; --i>=0;)
2276
+ for (int i=10; --i>=0;)
21542277 SmoothAnimData(); // much reduces shakiness
21552278
21562279 smoothed = true;
....@@ -2188,9 +2311,16 @@
21882311 toVector.x = LA.cos(to);
21892312 toVector.y = LA.sin(to);
21902313
2314
+ double fromA = Math.atan2(fromVector.y, fromVector.x);
2315
+ double toA = Math.atan2(toVector.y, toVector.x);
2316
+
21912317 Vector2d currentVector = Slerp(fromVector, toVector, step);
21922318
2193
- return Math.atan2(currentVector.y, currentVector.x);
2319
+ double angle = Math.atan2(currentVector.y, currentVector.x);
2320
+
2321
+ double angle2 = (1-step) * fromA + step * toA;
2322
+
2323
+ return angle;
21942324 }
21952325
21962326 public static Vector2d Slerp(Vector2d from, Vector2d to, double step)
....@@ -2242,6 +2372,8 @@
22422372 {
22432373 e.printStackTrace();
22442374 }
2375
+
2376
+ SetHipOrientation();
22452377
22462378 if (true)
22472379 return;
....@@ -2670,8 +2802,9 @@
26702802 // set rotation
26712803 //if (bone._rotationEnabled)
26722804 if (//frame > 0 &&
2673
- !bone.skipmocap //&&
2674
- //!bone.name.contains("head") &&
2805
+ !bone.skipmocap &&
2806
+ !bone.name.contains("head") &&
2807
+ !bone.name.contains("Head") // &&
26752808 // !bone.name.contains("rFoot") &&
26762809 // !bone.name.contains("lFoot") &&
26772810 // !bone.name.contains("Pinky") &&
....@@ -3056,8 +3189,8 @@
30563189
30573190 void Reset()
30583191 {
3059
- if (fullname != null)
3060
- ReadBVH();
3192
+// if (fullname != null)
3193
+// ReadBVH();
30613194
30623195 Object3D hip = get(0);
30633196
....@@ -3096,8 +3229,8 @@
30963229 // LA.matIdentity(rot.fromParent);
30973230
30983231 // july 2014
3099
- goalx = goalz = 0;
3100
- targetx = targetz = 0;
3232
+// goalx = goalz = 0;
3233
+ targetdirx = targetdirz = 0;
31013234
31023235 //SetPositionDelta(true, true, true, false);
31033236 // LoadData();
....@@ -3107,8 +3240,8 @@
31073240
31083241 // aout 2013 endframe = 0; // june 2013
31093242
3110
- //ResetZero();
3111
- setPose(frame);
3243
+ ResetZero();
3244
+ //setPose(frame);
31123245 }
31133246
31143247 static int mocapsupport = 0;
....@@ -3126,12 +3259,13 @@
31263259
31273260 int step = 1;
31283261
3262
+ // patch for running hare
31293263 if (speedup) // fev 2014
31303264 step *= 2; // 4;
31313265 if (rewind) // mars 2014
31323266 step *= 4;
31333267
3134
- if (CameraPane.FAST) // && !CameraPane.HOLD)
3268
+ //if (CameraPane.FAST) // && !CameraPane.HOLD)
31353269 step *= CameraPane.STEP;
31363270
31373271 //System.err.println("Step Mocap frame # " + frame);
....@@ -3163,7 +3297,7 @@
31633297 "; fullname = " + fullname);
31643298
31653299 //int delta = frame - baseframe;
3166
- if (CameraPane.CROWD)
3300
+ if (Globals.CROWD)
31673301 {
31683302 baseframe = GetFirstFrame(); // 0 initial point
31693303 }
....@@ -3172,23 +3306,40 @@
31723306 // SetPositionDelta(false, true, false); // ?? false);
31733307 {
31743308 if (support == null)
3175
- ObjEditor.LoadBVHFile(fullname, this, false, beginframe, lastframetest);
3309
+ {
3310
+ if (bvh == null && new File(fullname).exists())
3311
+ ObjEditor.LoadBVHFile(fullname, this, false, beginframe, lastframetest);
3312
+ else
3313
+ {
3314
+ SetGlobalTransform();
3315
+ Rewind();
3316
+ Fade();
3317
+ }
3318
+ }
31763319 else
31773320 {
3178
- try
3179
- {
3321
+// try
3322
+// {
31803323 bvh = ((Mocap)support.get(mocapsupport++ % support.Size())).bvh;
31813324
31823325 // SetPositionDelta(false, true, true, true);
31833326 LoadData();
31843327 Rewind();
31853328 Fade();
3186
- }
3187
- catch (Exception e)
3188
- {
3189
- e.printStackTrace();
3190
- ObjEditor.LoadBVHFile(fullname, this, false, beginframe, lastframetest);
3191
- }
3329
+// }
3330
+// catch (Exception e)
3331
+// {
3332
+// System.err.println("An error occured while loading data. Use fallback by loading the file.");
3333
+// //e.printStackTrace();
3334
+// try
3335
+// {
3336
+// ObjEditor.LoadBVHFile(fullname, this, false, beginframe, lastframetest);
3337
+// }
3338
+// catch (Exception e2)
3339
+// {
3340
+// System.err.println("Motion file not found: " + fullname);
3341
+// }
3342
+// }
31923343 }
31933344 }
31943345
....@@ -3370,6 +3521,7 @@
33703521 // filters out bad input data
33713522 void FilterAnimData()
33723523 {
3524
+ new Exception().printStackTrace();
33733525 System.exit(0);
33743526
33753527 float[] data; // = bvh.animation.getBoneData(0);
....@@ -3727,7 +3879,7 @@
37273879
37283880 transient boolean restarted; // CROWD issue?
37293881
3730
- void drawSelf(CameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked)
3882
+ void drawSelf(iCameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked)
37313883 {
37323884 //System.err.println("drawSelf Mocap frame # " + frame);
37333885 //System.err.println("drawSelf Mocap baseframe # " + baseframe);
....@@ -3744,17 +3896,22 @@
37443896 // if (firstframe)
37453897 // return;
37463898
3747
- if (!restarted && /*display.restartframe &&*/
3748
- display.isLIVE() && live && display.drawMode == display.SHADOW) // FUCK
3899
+ if (//!restarted && /*display.restartframe &&*/
3900
+ Globals.isLIVE() && live && (display.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW))
37493901 {
37503902 //display.restartframe = false;
37513903 restarted = true;
3904
+ //System.err.println("restarted = true");
37523905 Step();
37533906 }
37543907 else
37553908 {
3756
- if (display.isLIVE() && live && display.drawMode != display.SHADOW)
3909
+ //System.err.println("restarted");
3910
+ if (Globals.isLIVE() && live && display.DrawMode() != iCameraPane.SHADOW)
3911
+ {
37573912 restarted = false;
3913
+ //System.err.println("restarted = false");
3914
+ }
37583915 }
37593916
37603917 super.drawSelf(display, root, selected, blocked);