Provide more info if a subgame is not valid/found

This commit is contained in:
Craig Robbins 2014-12-13 23:01:16 +10:00
parent ce4ed65a39
commit 784a452ed5
1 changed files with 6 additions and 0 deletions

View File

@ -1395,6 +1395,12 @@ static bool determine_subgame(GameParams *game_params)
} else { // Otherwise we will be using "minetest"
gamespec = findSubgame(g_settings->get("default_game"));
infostream << "Using default gameid [" << gamespec.id << "]" << std::endl;
if (!gamespec.isValid()) {
errorstream << "Subgame specified in default_game ["
<< g_settings->get("default_game")
<< "] is invalid." << std::endl;
return false;
}
}
} else { // World exists
std::string world_gameid = getWorldGameId(game_params->world_path, false);