Revision 65d5505f
Added by Leszek Koltunski over 7 years ago
src/main/java/org/distorted/library/type/Dynamic5D.java | ||
---|---|---|
529 | 529 |
break; |
530 | 530 |
case MODE_PATH: segment = (int)(2*t*(numPoints-1)); |
531 | 531 |
|
532 |
if( t<0.5f )
|
|
533 |
{ |
|
532 |
if( t<=0.5f ) // this has to be <= (otherwise when effect ends at t=0.5, then time=1.0
|
|
533 |
{ // and end position is slightly not equal to the end point => might not get autodeleted!
|
|
534 | 534 |
time = 2*t*(numPoints-1); |
535 | 535 |
vecCurr = segment; |
536 | 536 |
} |
... | ... | |
559 | 559 |
{ |
560 | 560 |
case MODE_LOOP: vecNext = vecCurr==numPoints-1 ? 0:vecCurr+1; |
561 | 561 |
break; |
562 |
case MODE_PATH: if( t<0.5f ) vecNext = vecCurr==numPoints-1 ? numPoints-2: vecCurr+1; |
|
563 |
else vecNext = vecCurr==0 ? 1 : vecCurr-1; |
|
562 |
case MODE_PATH: if( t<=0.5f ) vecNext = vecCurr==numPoints-1 ? numPoints-2: vecCurr+1;
|
|
563 |
else vecNext = vecCurr==0 ? 1 : vecCurr-1;
|
|
564 | 564 |
break; |
565 | 565 |
case MODE_JUMP: vecNext = vecCurr==numPoints-1 ? 1:vecCurr+1; |
566 | 566 |
break; |
Also available in: Unified diff
2 bugfixes:
- in Dynamics, it has to be t<=0.5 (rather than t<0.5) (see comment in code)
- in EffectQueueVertex, we need to postprocess() the last time, when effect is finished but not removed!