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

Function MultiSendRequestForMarker

Descent3/multi.cpp:8841–8860  ·  view source on GitHub ↗

Client is asking for a marker

Source from the content-addressed store, hash-verified

8839
8840// Client is asking for a marker
8841void MultiSendRequestForMarker(char *message) {
8842 int count = 0;
8843 uint8_t data[MAX_GAME_DATA_SIZE];
8844 int size_offset;
8845 size_offset = START_DATA(MP_REQUEST_MARKER, data, &count);
8846
8847 MultiAddByte(Player_num, data, &count);
8848
8849 uint8_t len = strlen(message) + 1;
8850 MultiAddByte(len, data, &count);
8851 memcpy(data + count, message, len);
8852 count += len;
8853
8854 END_DATA(count, data, size_offset);
8855
8856 if (Netgame.local_role == LR_SERVER)
8857 MultiDoRequestMarker(data);
8858 else
8859 nw_SendReliable(NetPlayers[Player_num].reliable_socket, data, count, false);
8860}
8861
8862// The server is telling me to adjust my position
8863void MultiDoAdjustPosition(uint8_t *data) {

Callers 1

DropMarkerFunction · 0.85

Calls 5

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

Tested by

no test coverage detected