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

Function MultiSendRequestTypeIcon

Descent3/multi.cpp:8390–8410  ·  view source on GitHub ↗

Client is telling the server that he is [not] typing a hud message

Source from the content-addressed store, hash-verified

8388
8389// Client is telling the server that he is [not] typing a hud message
8390void MultiSendRequestTypeIcon(bool typing_message) {
8391 uint32_t bit = (0x01 << Player_num);
8392
8393 if (typing_message && (bit & Players_typing))
8394 return; // already typing no need to request
8395
8396 int count = 0;
8397 uint8_t data[MAX_GAME_DATA_SIZE];
8398 int size_offset = START_DATA(MP_REQUEST_TYPE_ICON, data, &count);
8399
8400 MultiAddByte(Player_num, data, &count);
8401 MultiAddByte((typing_message) ? 1 : 0, data, &count);
8402
8403 END_DATA(count, data, size_offset);
8404
8405 if (Netgame.local_role == LR_SERVER) {
8406 MultiDoRequestTypeIcon(data);
8407 } else {
8408 nw_SendReliable(NetPlayers[Player_num].reliable_socket, data, count, false);
8409 }
8410}
8411
8412void MultiSendAiWeaponFlags(object *obj, int flags, int wb_index) {
8413 int count = 0;

Callers 3

StartHUDInputMessageFunction · 0.85
SendOffHUDInputMessageFunction · 0.85
DoHUDInputMessageKeyFunction · 0.85

Calls 5

START_DATAFunction · 0.85
MultiAddByteFunction · 0.85
END_DATAFunction · 0.85
MultiDoRequestTypeIconFunction · 0.85
nw_SendReliableFunction · 0.85

Tested by

no test coverage detected