| 828 | #endif |
| 829 | |
| 830 | void PlayGame() { |
| 831 | // Initialize misc game |
| 832 | if (InitGame()) { |
| 833 | // Run the game (note, if this call returns false, we couldn't play a level. Display an error maybe? |
| 834 | GameSequencer(); |
| 835 | } else { |
| 836 | SetFunctionMode(MENU_MODE); |
| 837 | |
| 838 | // if they were going into a multiplayer game than we need to handle cleaning all that up |
| 839 | if (Game_mode & GM_MULTI) { |
| 840 | SetGameMode(GM_NORMAL); |
| 841 | for (int i = 0; i < MAX_PLAYERS; i++) { |
| 842 | NetPlayers[i].flags &= ~NPF_CONNECTED; |
| 843 | } |
| 844 | } |
| 845 | } |
| 846 | |
| 847 | // Close down some game stuff |
| 848 | // close down any systems not needed outside game. |
| 849 | |
| 850 | // we must pop the pages before closing the mission, since we need to have the mn3 hog file open |
| 851 | mng_ClearAddonTables(); |
| 852 | |
| 853 | ResetMission(); |
| 854 | CloseGameScript(); |
| 855 | CloseHUD(); |
| 856 | // DoorwayDeactivateAll(); // deactivate doorways |
| 857 | ui_RemoveAllWindows(); // remove any ui windows left open. |
| 858 | SuspendControls(); |
| 859 | } |
| 860 | |
| 861 | /////////////////////////////////////////////////////////////////////////////// |
| 862 | // Sets the game mode. this will reinitialize the game mode script. |
no test coverage detected