Skip to content

Commit

Permalink
Server: Shut down if no game selected
Browse files Browse the repository at this point in the history
Since shell connections are not yet available in ringzero, the server
would get stuck in a gameless, unreachable state if game selection
fails for any reason.
  • Loading branch information
skyjake committed Feb 14, 2013
1 parent 919ef49 commit 925e9ad
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion doomsday/client/src/dd_main.cpp
Expand Up @@ -1844,7 +1844,7 @@ boolean DD_Init(void)
*/

// Attempt automatic game selection.
if(!CommandLine_Exists("-noautoselect"))
if(!CommandLine_Exists("-noautoselect") || isDedicated)
{
de::Game* game = DD_AutoselectGame();

Expand Down Expand Up @@ -1873,6 +1873,16 @@ boolean DD_Init(void)
// We do not want to load these resources again on next game change.
destroyPathList(&sessionResourceFileList, &numSessionResourceFileList);
}
#ifdef __SERVER__
else
{
// A server is presently useless without a game, as shell
// connections can only be made after a game is loaded and the
// server mode started.
/// @todo Allow shell connections in ringzero mode, too.
Con_Error("No playable games available.");
}
#endif
}

initPathLumpMappings();
Expand Down

0 comments on commit 925e9ad

Please sign in to comment.