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

Function MultiSendVisiblePlayers

Descent3/multi.cpp:6287–6302  ·  view source on GitHub ↗

Sends all the visible players to another player

Source from the content-addressed store, hash-verified

6285
6286// Sends all the visible players to another player
6287void MultiSendVisiblePlayers(int to_slot) {
6288 int count = 0;
6289 uint8_t data[MAX_GAME_DATA_SIZE];
6290 int size_offset;
6291
6292 size_offset = START_DATA(MP_VISIBLE_PLAYERS, data, &count);
6293
6294 // Always mark server as visible
6295 Multi_visible_players[to_slot] |= (1 << Player_num);
6296
6297 MultiAddUint(Multi_visible_players[to_slot], data, &count);
6298
6299 END_DATA(count, data, size_offset);
6300
6301 nw_Send(&NetPlayers[to_slot].addr, data, count, 0);
6302}
6303
6304void MultiDoRequestPeerDamage(uint8_t *data, network_address *from_addr) {
6305 int count = 0;

Callers 1

MultiDoServerFrameFunction · 0.85

Calls 4

START_DATAFunction · 0.85
MultiAddUintFunction · 0.85
END_DATAFunction · 0.85
nw_SendFunction · 0.85

Tested by

no test coverage detected