MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / advanceTime

Method advanceTime

Engine/source/T3D/projectile.cpp:1267–1294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1265
1266
1267void Projectile::advanceTime(F32 dt)
1268{
1269 Parent::advanceTime(dt);
1270
1271 if ( mHasExploded || dt == 0.0)
1272 return;
1273
1274 if (mActivateThread &&
1275 mProjectileShape->getDuration(mActivateThread) > mProjectileShape->getTime(mActivateThread) + dt)
1276 {
1277 mProjectileShape->advanceTime(dt, mActivateThread);
1278 }
1279 else
1280 {
1281
1282 if (mMaintainThread)
1283 {
1284 mProjectileShape->advanceTime(dt, mMaintainThread);
1285 }
1286 else if (mActivateThread && mDataBlock->maintainSeq != -1)
1287 {
1288 mMaintainThread = mProjectileShape->addThread();
1289 mProjectileShape->setTimeScale(mMaintainThread, 1);
1290 mProjectileShape->setSequence(mMaintainThread, mDataBlock->maintainSeq, 0);
1291 mProjectileShape->advanceTime(dt, mMaintainThread);
1292 }
1293 }
1294}
1295
1296void Projectile::interpolateTick(F32 delta)
1297{

Callers

nothing calls this directly

Calls 6

advanceTimeFunction · 0.85
getDurationMethod · 0.45
getTimeMethod · 0.45
addThreadMethod · 0.45
setTimeScaleMethod · 0.45
setSequenceMethod · 0.45

Tested by

no test coverage detected