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

Method recordBlock

Engine/source/sim/netConnection.cpp:1036–1051  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1034}
1035
1036void NetConnection::recordBlock(U32 type, U32 size, void *data)
1037{
1038 AssertFatal(type < MaxNumBlockTypes, "NetConnection::recordBlock: invalid type");
1039 AssertFatal(size < MaxBlockSize, "NetConnection::recordBlock: invalid size");
1040 if((type >= MaxNumBlockTypes) || (size >= MaxBlockSize))
1041 return;
1042
1043 if(mDemoWriteStream)
1044 {
1045 // store type/size in U16: [type:4][size:12]
1046 U16 typeSize = (type << 12) | size;
1047 mDemoWriteStream->write(typeSize);
1048 if(size)
1049 mDemoWriteStream->write(size, data);
1050 }
1051}
1052
1053void NetConnection::handleRecordedBlock(U32 type, U32 size, void *data)
1054{

Callers 2

collectMoveMethod · 0.80
collectMoveMethod · 0.80

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected