MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / setThreadSequence

Method setThreadSequence

Engine/source/T3D/shapeBase.cpp:2171–2199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2169}
2170
2171bool ShapeBase::setThreadSequence(U32 slot, S32 seq, bool reset)
2172{
2173 Thread& st = mScriptThread[slot];
2174 if (st.thread && st.sequence == seq && st.state == Thread::Play)
2175 return true;
2176
2177 // Handle a -1 sequence, as this may be set when a thread has been destroyed.
2178 if(seq == -1)
2179 return true;
2180
2181 if (seq < MaxSequenceIndex) {
2182 setMaskBits(ThreadMaskN << slot);
2183 st.sequence = seq;
2184 if (reset) {
2185 st.state = Thread::Play;
2186 st.atEnd = false;
2187 st.timescale = 1.f;
2188 st.position = 0.f;
2189 }
2190 if (mShapeInstance) {
2191 if (!st.thread)
2192 st.thread = mShapeInstance->addThread();
2193 mShapeInstance->setSequence(st.thread,seq,st.position);
2194 updateThread(st);
2195 }
2196 return true;
2197 }
2198 return false;
2199}
2200
2201void ShapeBase::updateThread(Thread& st)
2202{

Callers 3

shapeEditor.ed.csFile · 0.45
shapeEditor.ed.csFile · 0.45
shapeBase.cppFile · 0.45

Calls 2

addThreadMethod · 0.45
setSequenceMethod · 0.45

Tested by

no test coverage detected