| 2344 | } |
| 2345 | |
| 2346 | void ShapeBase::advanceThreads(F32 dt) |
| 2347 | { |
| 2348 | for (U32 i = 0; i < MaxScriptThreads; i++) { |
| 2349 | Thread& st = mScriptThread[i]; |
| 2350 | if (st.thread) { |
| 2351 | if (!mShapeInstance->getShape()->sequences[st.sequence].isCyclic() && !st.atEnd && |
| 2352 | ( ( st.timescale > 0.f )? mShapeInstance->getPos(st.thread) >= 1.0: |
| 2353 | mShapeInstance->getPos(st.thread) <= 0)) { |
| 2354 | st.atEnd = true; |
| 2355 | updateThread(st); |
| 2356 | if (!isGhost()) { |
| 2357 | mDataBlock->onEndSequence_callback(this, i, this->getThreadSequenceName(i)); |
| 2358 | } |
| 2359 | } |
| 2360 | |
| 2361 | // Make sure the thread is still valid after the call to onEndSequence_callback(). |
| 2362 | // Someone could have called destroyThread() while in there. |
| 2363 | if(st.thread) |
| 2364 | { |
| 2365 | mShapeInstance->advanceTime(dt,st.thread); |
| 2366 | st.position = mShapeInstance->getPos(st.thread); |
| 2367 | } |
| 2368 | } |
| 2369 | } |
| 2370 | } |
| 2371 | |
| 2372 | //---------------------------------------------------------------------------- |
| 2373 |
nothing calls this directly
no test coverage detected