forked from Mirrorlandia_minetest/minetest
fast_move and free_move can now be toggled
This commit is contained in:
parent
5200f96707
commit
544aeb0840
@ -40,6 +40,8 @@ void set_default_settings()
|
|||||||
g_settings.setDefault("keymap_inventory", "KEY_KEY_I");
|
g_settings.setDefault("keymap_inventory", "KEY_KEY_I");
|
||||||
g_settings.setDefault("keymap_chat", "KEY_KEY_T");
|
g_settings.setDefault("keymap_chat", "KEY_KEY_T");
|
||||||
g_settings.setDefault("keymap_rangeselect", "KEY_KEY_R");
|
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
|
// Some (temporary) keys for debugging
|
||||||
g_settings.setDefault("keymap_special1", "KEY_KEY_E");
|
g_settings.setDefault("keymap_special1", "KEY_KEY_E");
|
||||||
g_settings.setDefault("keymap_print_debug_stacks", "KEY_KEY_P");
|
g_settings.setDefault("keymap_print_debug_stacks", "KEY_KEY_P");
|
||||||
|
22
src/game.cpp
22
src/game.cpp
@ -1147,6 +1147,28 @@ void the_game(
|
|||||||
&g_menumgr, dest,
|
&g_menumgr, dest,
|
||||||
L""))->drop();
|
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
|
// Item selection with mouse wheel
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user