MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / StartPacket

Method StartPacket

netgames/dmfc/dmfcpackets.cpp:194–198  ·  view source on GitHub ↗

DMFCBase::StartPacket Initializes a packet so it is ready to be sent out. data = pointer to buffer of data for packet. This buffer should be MAX_GAME_DATA_SIZE in size, even if you don't plan on using all that data, there is header information that is added in this function. id = ID of the Special packet. When the packet is recieved by whomever, this is the ID that determines which handler to c

Source from the content-addressed store, hash-verified

192// call.
193// count = pointer to your packet index pointer
194void DMFCBase::StartPacket(uint8_t *data, uint8_t id, int *count) {
195 *count = 0;
196
197 MultiAddByte(id, data, count); // set the first byte (invisible to coder) as the id
198}
199
200// DMFCBase::SendPacket
201//

Callers 15

SendGameStartPacketFunction · 0.80
SendCollideInfoFunction · 0.80
SendLastHitInfoFunction · 0.80
SendGameStartPacketFunction · 0.80
SendHoardInvFunction · 0.80
SendGameConfigFunction · 0.80
PRec_SendPRecToPlayerFunction · 0.80
Remote_SendMessageFunction · 0.80
OnServerCollideFunction · 0.80

Calls 1

MultiAddByteFunction · 0.85

Tested by

no test coverage detected