server is telling us the level has ended
| 3569 | |
| 3570 | // server is telling us the level has ended |
| 3571 | void MultiDoLevelEnded(uint8_t *data) { |
| 3572 | int count = 0; |
| 3573 | SKIP_HEADER(data, &count); |
| 3574 | |
| 3575 | int success = MultiGetByte(data, &count); |
| 3576 | Multi_next_level = MultiGetByte(data, &count); |
| 3577 | |
| 3578 | // Make sure we're not being fooled |
| 3579 | if (Multi_next_level < 1 || Multi_next_level > Current_mission.num_levels) |
| 3580 | Multi_next_level = -1; |
| 3581 | |
| 3582 | mprintf(0, "Doing level ended! Next level=%d\n", Multi_next_level); |
| 3583 | |
| 3584 | if (success) |
| 3585 | SetGameState(GAMESTATE_LVLEND); |
| 3586 | else |
| 3587 | SetGameState(GAMESTATE_LVLFAILED); |
| 3588 | |
| 3589 | NetPlayers[Player_num].sequence = NETSEQ_LEVEL_END; |
| 3590 | |
| 3591 | Multi_bail_ui_menu = true; |
| 3592 | |
| 3593 | CallGameDLL(EVT_CLIENT_GAMELEVELEND, &DLLInfo); |
| 3594 | CallMultiDLL(MT_EVT_GAME_OVER); |
| 3595 | ScoreAPIGameOver(); |
| 3596 | } |
| 3597 | |
| 3598 | // Tells all the clients to end the level |
| 3599 | void MultiSendLevelEnded(int success, int next_level) { |
no test coverage detected