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

Function MultiSendEndPlayerDeath

Descent3/multi.cpp:4911–4927  ·  view source on GitHub ↗

Tell the server that I'm done dying

Source from the content-addressed store, hash-verified

4909
4910// Tell the server that I'm done dying
4911void MultiSendEndPlayerDeath() {
4912 int count = 0;
4913 uint8_t data[MAX_GAME_DATA_SIZE];
4914 int size_offset;
4915
4916 mprintf(0, "Sending end player death packet!\n");
4917
4918 size_offset = START_DATA(MP_END_PLAYER_DEATH, data, &count);
4919
4920 MultiAddByte(Player_num, data, &count);
4921 END_DATA(count, data, size_offset);
4922
4923 if (Netgame.local_role == LR_CLIENT)
4924 nw_SendReliable(NetPlayers[Player_num].reliable_socket, data, count, false);
4925 else
4926 MultiDoEndPlayerDeath(data);
4927}
4928
4929// Prints out a message we got from the server
4930void MultiDoMessageFromServer(uint8_t *data) {

Callers 3

RunGameMenuFunction · 0.85
ProcessButtonsFunction · 0.85
ProcessNormalKeyFunction · 0.85

Calls 5

START_DATAFunction · 0.85
MultiAddByteFunction · 0.85
END_DATAFunction · 0.85
nw_SendReliableFunction · 0.85
MultiDoEndPlayerDeathFunction · 0.85

Tested by

no test coverage detected