the server is telling us that about a player's message-type state (is [not] typing a message)
| 8343 | |
| 8344 | // the server is telling us that about a player's message-type state (is [not] typing a message) |
| 8345 | void MultiDoTypeIcon(uint8_t *data) { |
| 8346 | int count = 0; |
| 8347 | SKIP_HEADER(data, &count); |
| 8348 | int pnum = MultiGetByte(data, &count); |
| 8349 | bool typing = (MultiGetByte(data, &count)) ? true : false; |
| 8350 | |
| 8351 | ASSERT(pnum >= 0 && pnum < MAX_PLAYERS); |
| 8352 | |
| 8353 | uint32_t bit = 0x01; |
| 8354 | bit = bit << pnum; |
| 8355 | |
| 8356 | if (typing) { |
| 8357 | mprintf(0, "%s is typing\n", Players[pnum].callsign); |
| 8358 | Players_typing |= bit; |
| 8359 | } else { |
| 8360 | mprintf(0, "%s is done typing\n", Players[pnum].callsign); |
| 8361 | Players_typing &= ~bit; |
| 8362 | } |
| 8363 | } |
| 8364 | |
| 8365 | // tell the clients that a player is [not] typing a message |
| 8366 | void MultiSendTypeIcon(int pnum, bool typing_message) { |
no test coverage detected