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

Function MultiSendGenericNonVis

Descent3/multi_server.cpp:2190–2209  ·  view source on GitHub ↗

Sends out a list of generics that this client can't see

Source from the content-addressed store, hash-verified

2188
2189// Sends out a list of generics that this client can't see
2190void MultiSendGenericNonVis(int slot, uint16_t *objarray, int num) {
2191 uint8_t data[MAX_GAME_DATA_SIZE];
2192 int count = 0;
2193 int size_offset;
2194
2195 size_offset = START_DATA(MP_GENERIC_NONVIS, data, &count);
2196
2197 MultiAddShort(num, data, &count);
2198
2199 for (int i = 0; i < num; i++) {
2200 MultiAddUshort(objarray[i], data, &count);
2201 }
2202
2203 ASSERT(count < MAX_GAME_DATA_SIZE);
2204
2205 END_DATA(count, data, size_offset);
2206
2207 // Send it out
2208 nw_SendReliable(NetPlayers[slot].reliable_socket, data, count);
2209}
2210
2211// Does the bookkeeping that needs to be done for non visible generic objects and a player
2212void MultiDoNonVisGenericForSlot(int slot) {

Callers 1

Calls 5

START_DATAFunction · 0.85
MultiAddShortFunction · 0.85
MultiAddUshortFunction · 0.85
END_DATAFunction · 0.85
nw_SendReliableFunction · 0.85

Tested by

no test coverage detected