From 5a8ee4889d770bc512838bf965b7770c52d8b7f5 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sun, 11 Mar 2012 21:41:32 +0200 Subject: [PATCH] Handle certain errors properly when using --go --- src/main.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 5e46018c..0d1961ff 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; -- 2.30.2