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

Method unpackUpdate

Engine/source/T3D/pathCamera.cpp:450–496  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

448}
449
450void PathCamera::unpackUpdate(NetConnection *con, BitStream *stream)
451{
452 Parent::unpackUpdate(con,stream);
453
454 // StateMask
455 if (stream->readFlag())
456 mState = stream->readInt(StateBits);
457
458 // PositionMask
459 if (stream->readFlag())
460 {
461 stream->read(&mPosition);
462 delta.time = mPosition;
463 delta.timeVec = 0;
464 }
465
466 // TargetMask
467 if (stream->readFlag())
468 {
469 mTargetSet = stream->readFlag();
470 if (mTargetSet)
471 stream->read(&mTarget);
472 }
473
474 // WindowMask
475 if (stream->readFlag())
476 {
477 mSpline.removeAll();
478 stream->read(&mNodeBase);
479 stream->read(&mNodeCount);
480 for (S32 i = 0; i < mNodeCount; i++)
481 {
482 CameraSpline::Knot *knot = new CameraSpline::Knot();
483 mathRead(*stream, &knot->mPosition);
484 mathRead(*stream, &knot->mRotation);
485 stream->read(&knot->mSpeed);
486 knot->mType = (CameraSpline::Knot::Type)stream->readInt(CameraSpline::Knot::NUM_TYPE_BITS);
487 knot->mPath = (CameraSpline::Knot::Path)stream->readInt(CameraSpline::Knot::NUM_PATH_BITS);
488 mSpline.push_back(knot);
489 }
490 }
491
492 // Controlled by the client?
493 if (stream->readFlag())
494 return;
495
496}
497
498
499//-----------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 6

mathReadFunction · 0.85
readFlagMethod · 0.80
readIntMethod · 0.80
readMethod · 0.45
removeAllMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected