aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2015-11-03 15:29:52 +0100
committerest31 <MTest31@outlook.com>2015-11-03 15:40:47 +0100
commit1550ab3c5d17787bcb9885c045db2f07aa4971ac (patch)
tree133d5db24626167b2f523ec27effb75dfbed0b20
parent6ba4f3775e9b2a5bacb2537c058728a67222b67d (diff)
downloadminetest-1550ab3c5d17787bcb9885c045db2f07aa4971ac.tar.gz
minetest-1550ab3c5d17787bcb9885c045db2f07aa4971ac.tar.bz2
minetest-1550ab3c5d17787bcb9885c045db2f07aa4971ac.zip
Only go fast in autorun if fast move is enabled
-rw-r--r--src/localplayer.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 96e2737c7..e55464479 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -512,15 +512,16 @@ void LocalPlayer::applyControl(float dtime)
}
}
- if(continuous_forward)
+ if (continuous_forward)
speedH += move_direction;
- if(control.up)
- {
- if(continuous_forward)
- superspeed = true;
- else
+ if (control.up) {
+ if (continuous_forward) {
+ if (fast_move)
+ superspeed = true;
+ } else {
speedH += move_direction;
+ }
}
if(control.down)
{