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

Method packUpdate

Engine/source/T3D/rigidShape.cpp:1458–1484  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1456//----------------------------------------------------------------------------
1457
1458U32 RigidShape::packUpdate(NetConnection *con, U32 mask, BitStream *stream)
1459{
1460 U32 retMask = Parent::packUpdate(con, mask, stream);
1461
1462 // The rest of the data is part of the control object packet update.
1463 // If we're controlled by this client, we don't need to send it.
1464 if (stream->writeFlag(getControllingClient() == con && !(mask & InitialUpdateMask)))
1465 return retMask;
1466
1467 mDelta.move.pack(stream);
1468
1469 if (stream->writeFlag(mask & PositionMask))
1470 {
1471 stream->writeFlag(mask & ForceMoveMask);
1472
1473 stream->writeCompressedPoint(mRigid.linPosition);
1474 mathWrite(*stream, mRigid.angPosition);
1475 mathWrite(*stream, mRigid.linMomentum);
1476 mathWrite(*stream, mRigid.angMomentum);
1477 stream->writeFlag(mRigid.atRest);
1478 }
1479
1480 if(stream->writeFlag(mask & FreezeMask))
1481 stream->writeFlag(mDisableMove);
1482
1483 return retMask;
1484}
1485
1486void RigidShape::unpackUpdate(NetConnection *con, BitStream *stream)
1487{

Callers

nothing calls this directly

Calls 4

mathWriteFunction · 0.85
writeCompressedPointMethod · 0.80
writeFlagMethod · 0.45
packMethod · 0.45

Tested by

no test coverage detected