Normand Briere
2019-06-21 15123b19e7bc8da2869429b07f0fbaa0598e945e
Object3D.java
....@@ -893,7 +893,8 @@
893893
894894 boolean changedir = random && Math.random() < 0.01; // && !link2master;
895895
896
- if (transformcount*factor > maxcount || (step == 1 && changedir))
896
+ if (transformcount*factor >= maxcount && (rewind || random) ||
897
+ (step == 1 && changedir))
897898 {
898899 countdown = 1;
899900 delay = speedup?8:1;
....@@ -3503,7 +3504,8 @@
35033504 if (blockloop)
35043505 return;
35053506
3506
- if (marked || (bRep != null && material != null)) // borderline...
3507
+ if (//marked || // does not make sense
3508
+ (bRep != null || material != null)) // borderline...
35073509 live = h;
35083510
35093511 for (int i = 0; i < Size(); i++)
....@@ -3524,7 +3526,8 @@
35243526 return;
35253527
35263528 //if (bRep != null)
3527
- if (marked || (bRep != null && material != null)) // borderline...
3529
+ if (//marked || // does not make sense
3530
+ (bRep != null || material != null)) // borderline...
35283531 link2master = h;
35293532
35303533 for (int i = 0; i < Size(); i++)
....@@ -3544,7 +3547,8 @@
35443547 if (blockloop)
35453548 return;
35463549
3547
- if (marked || (bRep != null && material != null)) // borderline...
3550
+ if (//marked || // does not make sense
3551
+ (bRep != null || material != null)) // borderline...
35483552 hide = h;
35493553
35503554 for (int i = 0; i < Size(); i++)
....@@ -3564,7 +3568,7 @@
35643568 if (blockloop)
35653569 return;
35663570
3567
- if (bRep != null && material != null) // borderline...
3571
+ if (bRep != null || material != null) // borderline...
35683572 marked = h;
35693573
35703574 for (int i = 0; i < Size(); i++)
....@@ -3579,6 +3583,46 @@
35793583 }
35803584 }
35813585
3586
+ void RewindLeaves(boolean h)
3587
+ {
3588
+ if (blockloop)
3589
+ return;
3590
+
3591
+ if (bRep != null || material != null) // borderline...
3592
+ rewind = h;
3593
+
3594
+ for (int i = 0; i < Size(); i++)
3595
+ {
3596
+ Object3D child = (Object3D) get(i); // reserve(i);
3597
+ if (child == null)
3598
+ continue;
3599
+ blockloop = true;
3600
+ child.RewindLeaves(h);
3601
+ blockloop = false;
3602
+ // release(i);
3603
+ }
3604
+ }
3605
+
3606
+ void RandomLeaves(boolean h)
3607
+ {
3608
+ if (blockloop)
3609
+ return;
3610
+
3611
+ if (bRep != null || material != null) // borderline...
3612
+ random = h;
3613
+
3614
+ for (int i = 0; i < Size(); i++)
3615
+ {
3616
+ Object3D child = (Object3D) get(i); // reserve(i);
3617
+ if (child == null)
3618
+ continue;
3619
+ blockloop = true;
3620
+ child.RandomLeaves(h);
3621
+ blockloop = false;
3622
+ // release(i);
3623
+ }
3624
+ }
3625
+
35823626 void SetTexRes(int tr)
35833627 {
35843628 texres = tr;