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

Method packUpdate

Engine/source/T3D/components/physics/physicsBehavior.cpp:104–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104U32 PhysicsComponent::packUpdate(NetConnection *con, U32 mask, BitStream *stream)
105{
106 U32 retMask = Parent::packUpdate(con, mask, stream);
107
108 if(stream->writeFlag(mask & VelocityMask))
109 mathWrite( *stream, mVelocity );
110
111 if(stream->writeFlag(mask & UpdateMask))
112 {
113 stream->writeFlag(mStatic);
114 stream->writeFlag(mAtRest);
115 stream->writeInt(mAtRestCounter,8);
116
117 mathWrite( *stream, mGravity );
118
119 stream->writeFloat(mDrag, 12);
120 //stream->writeFloat(mMass, 12);
121
122 stream->writeFloat(mGravityMod, 12);
123 }
124 return retMask;
125}
126
127void PhysicsComponent::unpackUpdate(NetConnection *con, BitStream *stream)
128{

Callers

nothing calls this directly

Calls 4

mathWriteFunction · 0.85
writeIntMethod · 0.80
writeFloatMethod · 0.80
writeFlagMethod · 0.45

Tested by

no test coverage detected