Sends a message from the server to the client
| 5038 | |
| 5039 | // Sends a message from the server to the client |
| 5040 | void MultiSendMessageToServer(int color, char *message, int to_who) { |
| 5041 | int count = 0; |
| 5042 | uint8_t data[MAX_GAME_DATA_SIZE]; |
| 5043 | int size_offset; |
| 5044 | |
| 5045 | size_offset = START_DATA(MP_MESSAGE_TO_SERVER, data, &count); |
| 5046 | MultiAddByte(Player_num, data, &count); |
| 5047 | MultiAddByte(to_who, data, &count); |
| 5048 | |
| 5049 | uint8_t len = strlen(message) + 1; |
| 5050 | |
| 5051 | MultiAddByte(len, data, &count); |
| 5052 | |
| 5053 | memcpy(&data[count], message, len); |
| 5054 | |
| 5055 | count += len; |
| 5056 | |
| 5057 | END_DATA(count, data, size_offset); |
| 5058 | |
| 5059 | nw_SendReliable(NetPlayers[Player_num].reliable_socket, data, count, false); |
| 5060 | } |
| 5061 | |
| 5062 | // Executes a dll that the server says to |
| 5063 | void MultiDoExecuteDLL(uint8_t *data) { |
no test coverage detected