| 729 | } |
| 730 | |
| 731 | void afxModel::resetAnimation(U32 tag) |
| 732 | { |
| 733 | // check if this is a blended clip |
| 734 | if ((tag & 0x80000000) != 0) |
| 735 | { |
| 736 | for (S32 i = 0; i < blend_clips.size(); i++) |
| 737 | { |
| 738 | if (blend_clips[i].tag == tag) |
| 739 | { |
| 740 | if (blend_clips[i].thread) |
| 741 | { |
| 742 | //Con::printf("DESTROY THREAD %d of %d tag=%d" , i, blend_clips.size(), tag & 0x7fffffff); |
| 743 | shape_inst->destroyThread(blend_clips[i].thread); |
| 744 | } |
| 745 | blend_clips.erase_fast(i); |
| 746 | break; |
| 747 | } |
| 748 | } |
| 749 | return; |
| 750 | } |
| 751 | |
| 752 | if (tag != 0 && tag == last_anim_tag) |
| 753 | { |
| 754 | // restore original non-animated state |
| 755 | if (main_seq_id == -1) |
| 756 | { |
| 757 | shape_inst->destroyThread(main_seq_thread); |
| 758 | main_seq_thread = 0; |
| 759 | } |
| 760 | // restore original sequence |
| 761 | else |
| 762 | { |
| 763 | shape_inst->setTimeScale(main_seq_thread, seq_rate_factor*mDataBlock->seq_rate); |
| 764 | shape_inst->transitionToSequence(main_seq_thread, main_seq_id , 0.0f, 0.25f, true); |
| 765 | } |
| 766 | last_anim_tag = 0; |
| 767 | } |
| 768 | } |
| 769 | |
| 770 | F32 afxModel::getAnimClipDuration(const char* clip) |
| 771 | { |
nothing calls this directly
no test coverage detected