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

Method getPacketDataChecksum

Engine/source/T3D/gameBase/gameBase.cpp:546–560  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

544}
545
546U32 GameBase::getPacketDataChecksum(GameConnection * connection)
547{
548 // just write the packet data into a buffer
549 // then we can CRC the buffer. This should always let us
550 // know when there is a checksum problem.
551
552 static U8 buffer[1500] = { 0, };
553 BitStream stream(buffer, sizeof(buffer));
554
555 writePacketData(connection, &stream);
556 U32 byteCount = stream.getPosition();
557 U32 ret = CRC::calculateCRC(buffer, byteCount, 0xFFFFFFFF);
558 dMemset(buffer, 0, byteCount);
559 return ret;
560}
561
562void GameBase::writePacketData(GameConnection*, BitStream*)
563{

Callers 4

onTickObjectMethod · 0.45
clientCatchupMethod · 0.45
onTickObjectMethod · 0.45
onTickObjectMethod · 0.45

Calls 2

dMemsetFunction · 0.50
getPositionMethod · 0.45

Tested by

no test coverage detected