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

Function MultiSendRequestForWorldStates

Descent3/multi_client.cpp:255–273  ·  view source on GitHub ↗

Ask the server to tell me about the world

Source from the content-addressed store, hash-verified

253
254// Ask the server to tell me about the world
255void MultiSendRequestForWorldStates() {
256 int size;
257 uint8_t data[MAX_GAME_DATA_SIZE];
258 int count = 0;
259
260 mprintf(0, "Sending request for world states\n");
261
262 size = START_DATA(MP_REQUEST_WORLD_STATES, data, &count);
263 MultiAddByte(Player_num, data, &count);
264 // Send the digest (checksum) for this level + our salt + the ships
265 // Do level checksum
266 for (int i = 0; i < 16; i++) {
267 MultiAddByte(NetPlayers[Player_num].digest[i], data, &count);
268 }
269
270 END_DATA(count, data, size);
271
272 nw_SendReliable(NetPlayers[Player_num].reliable_socket, data, count);
273}
274
275// Ask the server to tell me about the objects
276void MultiSendRequestForObjects() {

Callers 1

MultiDoClientFrameFunction · 0.85

Calls 4

START_DATAFunction · 0.85
MultiAddByteFunction · 0.85
END_DATAFunction · 0.85
nw_SendReliableFunction · 0.85

Tested by

no test coverage detected