summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-03-11 21:41:32 +0200
committerPerttu Ahola <celeron55@gmail.com>2012-03-11 21:41:32 +0200
commit5a8ee4889d770bc512838bf965b7770c52d8b7f5 (patch)
treed61c16224ac65e33ba4cbd3a5a624c4f777745f0
parentea1fdf3201a463a4f4c9aa9cd00622f6a2454711 (diff)
downloadminetest-5a8ee4889d770bc512838bf965b7770c52d8b7f5.tar.gz
minetest-5a8ee4889d770bc512838bf965b7770c52d8b7f5.tar.bz2
minetest-5a8ee4889d770bc512838bf965b7770c52d8b7f5.zip
Handle certain errors properly when using --go
-rw-r--r--src/main.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 5e46018c3..0d1961fff 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1207,6 +1207,8 @@ int main(int argc, char *argv[])
// The password entered during the menu screen,
std::string password;
+ bool first_loop = true;
+
/*
Menu-game loop
*/
@@ -1242,16 +1244,18 @@ int main(int argc, char *argv[])
*/
while(kill == false)
{
+ // If skip_main_menu, only go through here once
+ if(skip_main_menu && !first_loop){
+ kill = true;
+ break;
+ }
+ first_loop = false;
+
// Cursor can be non-visible when coming from the game
device->getCursorControl()->setVisible(true);
// Some stuff are left to scene manager when coming from the game
// (map at least?)
smgr->clear();
- // Reset or hide the debug gui texts
- /*guitext->setText(L"Minetest-c55");
- guitext2->setVisible(false);
- guitext_info->setVisible(false);
- guitext_chat->setVisible(false);*/
// Initialize menu data
MainMenuData menudata;