Clients says he's ready for level info so send it to him
| 780 | // Clients says he's ready for level info |
| 781 | // so send it to him |
| 782 | void MultiDoReadyForLevel(uint8_t *data) { |
| 783 | int count = 0; |
| 784 | uint8_t slot; |
| 785 | char ship_name[PAGENAME_LEN]; |
| 786 | |
| 787 | // Skip header stuff |
| 788 | SKIP_HEADER(data, &count); |
| 789 | |
| 790 | // Get slot number |
| 791 | slot = MultiGetByte(data, &count); |
| 792 | |
| 793 | // Copy the ship name out |
| 794 | int len = MultiGetByte(data, &count); |
| 795 | memcpy(ship_name, &data[count], len); |
| 796 | count += len; |
| 797 | |
| 798 | int ship_index = FindShipName(ship_name); |
| 799 | if (ship_index < 0) |
| 800 | ship_index = 0; |
| 801 | |
| 802 | PlayerChangeShip(slot, ship_index); |
| 803 | |
| 804 | MultiSendLevelInfo(slot); |
| 805 | NetPlayers[slot].sequence = NETSEQ_LEVEL_START; |
| 806 | } |
| 807 | |
| 808 | // Client is telling the server that he is ready for a level |
| 809 | // Client only |
no test coverage detected