1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

added in-game key shortcuts for toggling free_move and fast_move (default K and J)

This commit is contained in:
Perttu Ahola 2011-06-17 23:55:21 +03:00
parent 6b1f059ccd
commit e7580d2804
2 changed files with 28 additions and 0 deletions

View file

@ -1190,6 +1190,32 @@ 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");
chat_lines.push_back(ChatLine(L"free_move disabled"));
}
else
{
g_settings.set("free_move","true");
chat_lines.push_back(ChatLine(L"free_move enabled"));
}
}
else if(input->wasKeyDown(getKeySetting("keymap_fastmove")))
{
if(g_settings.getBool("fast_move"))
{
g_settings.set("fast_move","false");
chat_lines.push_back(ChatLine(L"fast_move disabled"));
}
else
{
g_settings.set("fast_move","true");
chat_lines.push_back(ChatLine(L"fast_move enabled"));
}
}
// Item selection with mouse wheel
{