mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 01:53:45 +01:00
Add a setting to enable always flying fast
This commit is contained in:
parent
0b1d09ff4f
commit
0437abbffb
@ -53,6 +53,8 @@
|
|||||||
#aux1_descends = false
|
#aux1_descends = false
|
||||||
# Doubletaping the jump key toogles fly mode
|
# Doubletaping the jump key toogles fly mode
|
||||||
#doubletap_jump = false
|
#doubletap_jump = false
|
||||||
|
# If false aux1 is used to fly fast
|
||||||
|
#always_fly_fast = true
|
||||||
# Some (temporary) keys for debugging
|
# Some (temporary) keys for debugging
|
||||||
#keymap_print_debug_stacks = KEY_KEY_P
|
#keymap_print_debug_stacks = KEY_KEY_P
|
||||||
#keymap_quicktune_prev = KEY_HOME
|
#keymap_quicktune_prev = KEY_HOME
|
||||||
|
@ -57,6 +57,7 @@ void set_default_settings(Settings *settings)
|
|||||||
settings->setDefault("anaglyph_strength", "0.1");
|
settings->setDefault("anaglyph_strength", "0.1");
|
||||||
settings->setDefault("aux1_descends", "false");
|
settings->setDefault("aux1_descends", "false");
|
||||||
settings->setDefault("doubletap_jump", "false");
|
settings->setDefault("doubletap_jump", "false");
|
||||||
|
settings->setDefault("always_fly_fast", "true");
|
||||||
|
|
||||||
// Some (temporary) keys for debugging
|
// Some (temporary) keys for debugging
|
||||||
settings->setDefault("keymap_print_debug_stacks", "KEY_KEY_P");
|
settings->setDefault("keymap_print_debug_stacks", "KEY_KEY_P");
|
||||||
|
@ -399,6 +399,9 @@ void LocalPlayer::applyControl(float dtime)
|
|||||||
// Whether superspeed mode is used or not
|
// Whether superspeed mode is used or not
|
||||||
bool superspeed = false;
|
bool superspeed = false;
|
||||||
|
|
||||||
|
if(g_settings->getBool("always_fly_fast") && free_move && fast_move)
|
||||||
|
superspeed = true;
|
||||||
|
|
||||||
// Old descend control
|
// Old descend control
|
||||||
if(g_settings->getBool("aux1_descends"))
|
if(g_settings->getBool("aux1_descends"))
|
||||||
{
|
{
|
||||||
@ -454,7 +457,8 @@ void LocalPlayer::applyControl(float dtime)
|
|||||||
{
|
{
|
||||||
// In free movement mode, sneak descends
|
// In free movement mode, sneak descends
|
||||||
v3f speed = getSpeed();
|
v3f speed = getSpeed();
|
||||||
if(fast_move && control.aux1)
|
if(fast_move && (control.aux1 ||
|
||||||
|
g_settings->getBool("always_fly_fast")))
|
||||||
speed.Y = -20*BS;
|
speed.Y = -20*BS;
|
||||||
else
|
else
|
||||||
speed.Y = -walkspeed_max;
|
speed.Y = -walkspeed_max;
|
||||||
@ -497,7 +501,8 @@ void LocalPlayer::applyControl(float dtime)
|
|||||||
{
|
{
|
||||||
v3f speed = getSpeed();
|
v3f speed = getSpeed();
|
||||||
|
|
||||||
if(g_settings->getBool("aux1_descends"))
|
if(g_settings->getBool("aux1_descends") ||
|
||||||
|
g_settings->getBool("always_fly_fast"))
|
||||||
{
|
{
|
||||||
if(fast_move)
|
if(fast_move)
|
||||||
speed.Y = 20*BS;
|
speed.Y = 20*BS;
|
||||||
|
Loading…
Reference in New Issue
Block a user