Sends the special script packet to a player
| 5648 | |
| 5649 | // Sends the special script packet to a player |
| 5650 | void MultiSendSpecialPacket(int slot, uint8_t *outdata, int size) { |
| 5651 | MULTI_ASSERT_NOMESSAGE(Netgame.local_role == LR_SERVER); |
| 5652 | |
| 5653 | int count = 0; |
| 5654 | uint8_t data[MAX_GAME_DATA_SIZE]; |
| 5655 | int size_offset; |
| 5656 | |
| 5657 | size_offset = START_DATA(MP_SPECIAL_PACKET, data, &count, 1); |
| 5658 | |
| 5659 | MultiAddInt(size, data, &count); |
| 5660 | |
| 5661 | // Send special packet data |
| 5662 | memcpy(&data[count], outdata, size); |
| 5663 | count += size; |
| 5664 | |
| 5665 | END_DATA(count, data, size_offset); |
| 5666 | |
| 5667 | nw_SendReliable(NetPlayers[slot].reliable_socket, data, count, true); |
| 5668 | } |
| 5669 | |
| 5670 | // Sends the special script packet to the server |
| 5671 | void MultiClientSendSpecialPacket(uint8_t *outdata, int size) { |
nothing calls this directly
no test coverage detected