]> git.lizzy.rs Git - minetest.git/blobdiff - src/game.cpp
Merge pull request #503 from RealBadAngel/master
[minetest.git] / src / game.cpp
index 588a0fef34cd1dbc43094b754d4b0a8807914dcc..86909ccf076800c38eebe8531bbfcae7d2ea0030 100644 (file)
@@ -29,6 +29,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "server.h"
 #include "guiPauseMenu.h"
 #include "guiPasswordChange.h"
+#include "guiVolumeChange.h"
 #include "guiFormSpecMenu.h"
 #include "guiTextInputMenu.h"
 #include "guiDeathScreen.h"
@@ -1262,7 +1263,7 @@ void the_game(
        gui::IGUIStaticText *guitext_info = guienv->addStaticText(
                        L"",
                        core::rect<s32>(0,0,400,text_height*5+5) + v2s32(100,200),
-                       false, false);
+                       false, true);
        
        // Status text (displays info when showing and hiding GUI stuff, etc.)
        gui::IGUIStaticText *guitext_status = guienv->addStaticText(
@@ -1519,6 +1520,13 @@ void the_game(
                        g_gamecallback->changepassword_requested = false;
                }
 
+               if(g_gamecallback->changevolume_requested)
+               {
+                       (new GUIVolumeChange(guienv, guiroot, -1,
+                               &g_menumgr, &client))->drop();
+                       g_gamecallback->changevolume_requested = false;
+               }
+
                /* Process TextureSource's queue */
                tsrc->processQueue();
 
@@ -2482,7 +2490,9 @@ void the_game(
                                
                                // Sign special case, at least until formspec is properly implemented.
                                // Deprecated?
-                               if(meta && meta->getString("formspec") == "hack:sign_text_input" && !random_input)
+                               if(meta && meta->getString("formspec") == "hack:sign_text_input" 
+                                               && !random_input
+                                               && !input->isKeyDown(getKeySetting("keymap_sneak")))
                                {
                                        infostream<<"Launching metadata text input"<<std::endl;
                                        
@@ -2497,7 +2507,8 @@ void the_game(
                                                        wtext))->drop();
                                }
                                // If metadata provides an inventory view, activate it
-                               else if(meta && meta->getString("formspec") != "" && !random_input)
+                               else if(meta && meta->getString("formspec") != "" && !random_input
+                                               && !input->isKeyDown(getKeySetting("keymap_sneak")))
                                {
                                        infostream<<"Launching custom inventory view"<<std::endl;
 
@@ -2528,7 +2539,8 @@ void the_game(
                                        // make that happen
                                        const ItemDefinition &def =
                                                        playeritem.getDefinition(itemdef);
-                                       if(def.node_placement_prediction != "")
+                                       if(def.node_placement_prediction != ""
+                                                       && !nodedef->get(map.getNode(nodepos)).rightclickable)
                                        do{ // breakable
                                                verbosestream<<"Node placement prediction for "
                                                                <<playeritem.name<<" is "