From 538036d004f914f31c276090d7735d61139fc58e Mon Sep 17 00:00:00 2001 From: est31 Date: Fri, 13 Mar 2015 04:35:34 +0100 Subject: Fix game minetest.conf default settings This was a regression introduced by f6e4c5d9cf459e8278a76a2beaee59732e841458 . --- src/script/lua_api/l_mainmenu.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/script/lua_api') diff --git a/src/script/lua_api/l_mainmenu.cpp b/src/script/lua_api/l_mainmenu.cpp index e6fcdcf83..36b97b2d1 100644 --- a/src/script/lua_api/l_mainmenu.cpp +++ b/src/script/lua_api/l_mainmenu.cpp @@ -644,15 +644,12 @@ int ModApiMainMenu::l_create_world(lua_State *L) (gameidx < (int) games.size())) { // Create world if it doesn't exist - if(!initializeWorld(path, games[gameidx].id)){ + if (!loadGameConfAndInitWorld(path, games[gameidx])) { lua_pushstring(L, "Failed to initialize world"); - - } - else { - lua_pushnil(L); + } else { + lua_pushnil(L); } - } - else { + } else { lua_pushstring(L, "Invalid game index"); } return 1; -- cgit v1.2.3