aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPilzAdam <PilzAdam@gmx.de>2013-01-07 18:18:16 +0100
committerPilzAdam <PilzAdam@gmx.de>2013-01-07 18:26:34 +0100
commit0437abbffbcff46e33de14c0baedc676f14e7507 (patch)
treefb7473eb9859c584d4d45a63b144bec378ed7b38 /src
parent0b1d09ff4f4e92986f6abdbc57db97c18707196a (diff)
downloadminetest-0437abbffbcff46e33de14c0baedc676f14e7507.tar.gz
minetest-0437abbffbcff46e33de14c0baedc676f14e7507.tar.bz2
minetest-0437abbffbcff46e33de14c0baedc676f14e7507.zip
Add a setting to enable always flying fast
Diffstat (limited to 'src')
-rw-r--r--src/defaultsettings.cpp1
-rw-r--r--src/localplayer.cpp9
2 files changed, 8 insertions, 2 deletions
diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp
index 75fea84c8..9ada214ae 100644
--- a/src/defaultsettings.cpp
+++ b/src/defaultsettings.cpp
@@ -57,6 +57,7 @@ void set_default_settings(Settings *settings)
settings->setDefault("anaglyph_strength", "0.1");
settings->setDefault("aux1_descends", "false");
settings->setDefault("doubletap_jump", "false");
+ settings->setDefault("always_fly_fast", "true");
// Some (temporary) keys for debugging
settings->setDefault("keymap_print_debug_stacks", "KEY_KEY_P");
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 751478213..b6dd0f42e 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -399,6 +399,9 @@ void LocalPlayer::applyControl(float dtime)
// Whether superspeed mode is used or not
bool superspeed = false;
+ if(g_settings->getBool("always_fly_fast") && free_move && fast_move)
+ superspeed = true;
+
// Old descend control
if(g_settings->getBool("aux1_descends"))
{
@@ -454,7 +457,8 @@ void LocalPlayer::applyControl(float dtime)
{
// In free movement mode, sneak descends
v3f speed = getSpeed();
- if(fast_move && control.aux1)
+ if(fast_move && (control.aux1 ||
+ g_settings->getBool("always_fly_fast")))
speed.Y = -20*BS;
else
speed.Y = -walkspeed_max;
@@ -497,7 +501,8 @@ void LocalPlayer::applyControl(float dtime)
{
v3f speed = getSpeed();
- if(g_settings->getBool("aux1_descends"))
+ if(g_settings->getBool("aux1_descends") ||
+ g_settings->getBool("always_fly_fast"))
{
if(fast_move)
speed.Y = 20*BS;