fast_move and free_move can now be toggled
authorteddydestodes <derkomtur@schattengang.net>
Sun, 29 May 2011 17:17:42 +0000 (19:17 +0200)
committerteddydestodes <derkomtur@schattengang.net>
Sun, 29 May 2011 17:17:42 +0000 (19:17 +0200)
src/defaultsettings.cpp
src/game.cpp

index f11b0b2d77e337a09d5dd294edca20afe9a1b123..e2ace0fe295fa6d4528ddcfd0c4cfecb5a3f7dcf 100644 (file)
@@ -40,6 +40,8 @@ void set_default_settings()
        g_settings.setDefault("keymap_inventory", "KEY_KEY_I");
        g_settings.setDefault("keymap_chat", "KEY_KEY_T");
        g_settings.setDefault("keymap_rangeselect", "KEY_KEY_R");
+       g_settings.setDefault("keymap_freemove", "KEY_KEY_K");
+       g_settings.setDefault("keymap_fastmove", "KEY_KEY_J");
        // Some (temporary) keys for debugging
        g_settings.setDefault("keymap_special1", "KEY_KEY_E");
        g_settings.setDefault("keymap_print_debug_stacks", "KEY_KEY_P");
index 603a86da3e0b53467d4286f0a0d2bd1a1d9c96cd..7970a6ed9425c18b435c9f3b8f4cb87e9025abc4 100644 (file)
@@ -1147,6 +1147,28 @@ void the_game(
                                        &g_menumgr, dest,
                                        L""))->drop();
                }
+               else if(input->wasKeyDown(getKeySetting("keymap_freemove")))
+               {
+                       if(g_settings.getBool("free_move"))
+                       {
+                               g_settings.set("free_move","false");
+                       }
+                       else
+                       {
+                               g_settings.set("free_move","true");
+                       }
+               }
+               else if(input->wasKeyDown(getKeySetting("keymap_fastmove")))
+               {
+                       if(g_settings.getBool("fast_move"))
+                       {
+                               g_settings.set("fast_move","false");
+                       }
+                       else
+                       {
+                               g_settings.set("fast_move","true");
+                       }
+               }
 
                // Item selection with mouse wheel
                {