mirror of
https://github.com/minetest/minetest.git
synced 2025-04-02 08:22:56 +02:00
Use default_game when making a new world using --world without --gameid
This commit is contained in:
@ -1279,7 +1279,9 @@ int main(int argc, char *argv[])
|
|||||||
menudata.selected_world = -1;
|
menudata.selected_world = -1;
|
||||||
// If a world was commanded, append and select it
|
// If a world was commanded, append and select it
|
||||||
if(commanded_world != ""){
|
if(commanded_world != ""){
|
||||||
std::string gameid = getWorldGameId(commanded_world);
|
std::string gameid = getWorldGameId(commanded_world, true);
|
||||||
|
if(gameid == "")
|
||||||
|
gameid = g_settings->get("default_game");
|
||||||
WorldSpec spec(commanded_world, "[commanded world]", gameid);
|
WorldSpec spec(commanded_world, "[commanded world]", gameid);
|
||||||
worldspecs.push_back(spec);
|
worldspecs.push_back(spec);
|
||||||
menudata.worlds.push_back(narrow_to_wide(spec.name)
|
menudata.worlds.push_back(narrow_to_wide(spec.name)
|
||||||
|
Reference in New Issue
Block a user