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

Function MultiSendToAllExcept

Descent3/multi_server.cpp:1842–1856  ·  view source on GitHub ↗

Sends this nonreliable packet to everyone except the server and the named slot

Source from the content-addressed store, hash-verified

1840
1841// Sends this nonreliable packet to everyone except the server and the named slot
1842void MultiSendToAllExcept(int except, uint8_t *data, int size, int seq_threshold) {
1843
1844 ASSERT(Netgame.local_role == LR_SERVER);
1845 for (int i = 0; i < MAX_NET_PLAYERS; i++) {
1846 if (!(NetPlayers[i].flags & NPF_CONNECTED))
1847 continue;
1848
1849 // Don't send to these clowns
1850 if (i == except || i == Player_num)
1851 continue;
1852
1853 if (seq_threshold == -1 || (NetPlayers[i].sequence >= seq_threshold && NetPlayers[i].sequence != NETSEQ_LEVEL_END))
1854 nw_Send(&NetPlayers[i].addr, data, size, 0);
1855 }
1856}
1857
1858// Flushes all receive sockets so that there is no data coming from them
1859void MultiFlushAllIncomingBuffers() {

Callers 4

MultiDoPongFunction · 0.85
MultiSendAiWeaponFlagsFunction · 0.85
MultiSendHeartbeatFunction · 0.85

Calls 1

nw_SendFunction · 0.85

Tested by

no test coverage detected