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

Function MultiDoRequestPlayers

Descent3/multi.cpp:2411–2425  ·  view source on GitHub ↗

Tell a client about the players connected Server only

Source from the content-addressed store, hash-verified

2409// Tell a client about the players connected
2410// Server only
2411void MultiDoRequestPlayers(uint8_t *data) {
2412 int count = 0;
2413
2414 // Skip header stuff
2415 SKIP_HEADER(data, &count);
2416
2417 uint8_t slot = MultiGetByte(data, &count);
2418 if (!(NetPlayers[slot].flags & NPF_CONNECTED)) {
2419 mprintf(1, "ERROR! We got a MY_INFO packet from a disconnected player!\n");
2420 Int3(); // Get Jason
2421 return;
2422 }
2423
2424 NetPlayers[slot].sequence = NETSEQ_REQUEST_PLAYERS;
2425}
2426
2427// Tell a client about the buildings
2428// Server only

Callers 1

MultiProcessDataFunction · 0.85

Calls 2

SKIP_HEADERFunction · 0.85
MultiGetByteFunction · 0.85

Tested by

no test coverage detected