mirror of
https://github.com/minetest/minetest.git
synced 2024-11-04 23:03:46 +01:00
Handle certain errors properly when using --go
This commit is contained in:
parent
ea1fdf3201
commit
5a8ee4889d
14
src/main.cpp
14
src/main.cpp
@ -1207,6 +1207,8 @@ int main(int argc, char *argv[])
|
|||||||
// The password entered during the menu screen,
|
// The password entered during the menu screen,
|
||||||
std::string password;
|
std::string password;
|
||||||
|
|
||||||
|
bool first_loop = true;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Menu-game loop
|
Menu-game loop
|
||||||
*/
|
*/
|
||||||
@ -1242,16 +1244,18 @@ int main(int argc, char *argv[])
|
|||||||
*/
|
*/
|
||||||
while(kill == false)
|
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
|
// Cursor can be non-visible when coming from the game
|
||||||
device->getCursorControl()->setVisible(true);
|
device->getCursorControl()->setVisible(true);
|
||||||
// Some stuff are left to scene manager when coming from the game
|
// Some stuff are left to scene manager when coming from the game
|
||||||
// (map at least?)
|
// (map at least?)
|
||||||
smgr->clear();
|
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
|
// Initialize menu data
|
||||||
MainMenuData menudata;
|
MainMenuData menudata;
|
||||||
|
Loading…
Reference in New Issue
Block a user