Server is telling us about the level
| 719 | |
| 720 | // Server is telling us about the level |
| 721 | void MultiDoLevelInfo(uint8_t *data) { |
| 722 | int count = 0; |
| 723 | char pshipmodel[PAGENAME_LEN]; |
| 724 | Current_pilot.get_ship(pshipmodel); |
| 725 | |
| 726 | int ship_index = FindShipName(pshipmodel); |
| 727 | if (ship_index < 0) |
| 728 | ship_index = 0; |
| 729 | |
| 730 | // Skip header stuff |
| 731 | SKIP_HEADER(data, &count); |
| 732 | |
| 733 | int join_response = MultiGetByte(data, &count); |
| 734 | |
| 735 | // Get level number |
| 736 | Current_mission.cur_level = MultiGetByte(data, &count); |
| 737 | |
| 738 | Netgame.difficulty = MultiGetByte(data, &count); |
| 739 | |
| 740 | if ((Netgame.difficulty > 4) || (Netgame.difficulty < 0)) |
| 741 | Netgame.difficulty = 2; |
| 742 | |
| 743 | if (join_response != JOIN_ANSWER_OK) |
| 744 | Got_level_info = -join_response; |
| 745 | else |
| 746 | Got_level_info = 1; |
| 747 | } |
| 748 | |
| 749 | // Server is telling the client about the level currently playing |
| 750 | // Server only |
no test coverage detected