MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / PlayGame

Function PlayGame

Descent3/game.cpp:830–859  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

828#endif
829
830void 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.

Callers 1

MainLoopFunction · 0.85

Calls 10

InitGameFunction · 0.85
GameSequencerFunction · 0.85
SetFunctionModeFunction · 0.85
SetGameModeFunction · 0.85
mng_ClearAddonTablesFunction · 0.85
ResetMissionFunction · 0.85
CloseGameScriptFunction · 0.85
CloseHUDFunction · 0.85
ui_RemoveAllWindowsFunction · 0.85
SuspendControlsFunction · 0.85

Tested by

no test coverage detected