aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2015-03-13 04:35:34 +0100
committerShadowNinja <shadowninja@minetest.net>2015-03-18 13:03:02 -0400
commit538036d004f914f31c276090d7735d61139fc58e (patch)
tree6d8d067c49d2c96dfa9469798150a02e0bd594c4 /src/script
parent467fc0ddc912ae38c3bf9fcb99e0b66d7478eec0 (diff)
downloadminetest-538036d004f914f31c276090d7735d61139fc58e.tar.gz
minetest-538036d004f914f31c276090d7735d61139fc58e.tar.bz2
minetest-538036d004f914f31c276090d7735d61139fc58e.zip
Fix game minetest.conf default settings
This was a regression introduced by f6e4c5d9cf459e8278a76a2beaee59732e841458 .
Diffstat (limited to 'src/script')
-rw-r--r--src/script/lua_api/l_mainmenu.cpp11
1 files changed, 4 insertions, 7 deletions
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;