| 2495 | } |
| 2496 | |
| 2497 | void ShapeBase::advanceThreads(F32 dt) |
| 2498 | { |
| 2499 | for (U32 i = 0; i < MaxScriptThreads; i++) { |
| 2500 | Thread& st = mScriptThread[i]; |
| 2501 | if (st.thread) { |
| 2502 | if (!mShapeInstance->getShape()->sequences[st.sequence].isCyclic() && !st.atEnd && |
| 2503 | ( ( st.timescale > 0.f )? mShapeInstance->getPos(st.thread) >= 1.0: |
| 2504 | mShapeInstance->getPos(st.thread) <= 0)) { |
| 2505 | st.atEnd = true; |
| 2506 | updateThread(st); |
| 2507 | if (!isGhost()) { |
| 2508 | mDataBlock->onEndSequence_callback(this, i, this->getThreadSequenceName(i)); |
| 2509 | } |
| 2510 | } |
| 2511 | |
| 2512 | // Make sure the thread is still valid after the call to onEndSequence_callback(). |
| 2513 | // Someone could have called destroyThread() while in there. |
| 2514 | if(st.thread) |
| 2515 | { |
| 2516 | mShapeInstance->advanceTime(dt,st.thread); |
| 2517 | st.position = mShapeInstance->getPos(st.thread); |
| 2518 | } |
| 2519 | } |
| 2520 | } |
| 2521 | } |
| 2522 | |
| 2523 | //---------------------------------------------------------------------------- |
| 2524 |
nothing calls this directly
no test coverage detected