setThreadSequence documentation in shapebase (TGE 1.5.2)
by Demolishun · in Torque Game Engine · 11/02/2009 (4:15 pm) · 0 replies
This description cannot be right. I see nothing in the implementation to make me believe it is communicating to a mounted object.
Maybe I am not seeing it, but this is confusing documentation. If it DOES communicate to a mounted object, please explain to me how this is so.
I clicked Bug Submissions because it seems to be an error in the header documentation. Also, on separate note, the Tags thing is strange. It kept giving me: 'setThreadSequence, thread, mount, shapebase, TGE' has not only alphabetic and digit characters. So I left it blank.
/// Sets the animation thread for a mounted object /// @param slot Mount slot ID /// @param seq Sequance id /// @param reset Reset the sequence bool setThreadSequence(U32 slot, S32 seq, bool reset = true);See for yourself:
bool ShapeBase::setThreadSequence(U32 slot,S32 seq,bool reset)
{
Thread& st = mScriptThread[slot];
if (st.thread && st.sequence == seq && st.state == Thread::Play)
return true;
if (seq < MaxSequenceIndex) {
setMaskBits(ThreadMaskN << slot);
st.sequence = seq;
if (reset) {
st.state = Thread::Play;
st.atEnd = false;
st.forward = true;
}
if (mShapeInstance) {
if (!st.thread)
st.thread = mShapeInstance->addThread();
mShapeInstance->setSequence(st.thread,seq,0);
stopThreadSound(st);
updateThread(st);
}
return true;
}
return false;
}Also look at how Thread is defined:struct Thread {
/// State of the animation thread.
enum State {
Play, Stop, Pause
};
TSThread* thread; ///< Pointer to 3space data.
U32 state; ///< State of the thread
///
/// @see Thread::State
S32 sequence; ///< The animation sequence which is running in this thread.
U32 sound; ///< Handle to sound.
bool atEnd; ///< Are we at the end of this thread?
bool forward; ///< Are we playing the thread forward? (else backwards)
};
Thread mScriptThread[MaxScriptThreads];Maybe I am not seeing it, but this is confusing documentation. If it DOES communicate to a mounted object, please explain to me how this is so.
I clicked Bug Submissions because it seems to be an error in the header documentation. Also, on separate note, the Tags thing is strange. It kept giving me: 'setThreadSequence, thread, mount, shapebase, TGE' has not only alphabetic and digit characters. So I left it blank.
About the author
I love programming, I love programming things that go click, whirr, boom. For organized T3D Links visit: http://demolishun.com/?page_id=67