diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-01-17 14:57:37 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-01-17 14:57:37 +0200 |
commit | 0fa0e0752a28eeb43195f2288c018d5c0b24520b (patch) | |
tree | 72c05dc4cd98663d92a6a312c6b8128c18791590 /src/player.cpp | |
parent | bd26be262d30eeb0ca818b634891704de4365893 (diff) | |
download | minetest-0fa0e0752a28eeb43195f2288c018d5c0b24520b.tar.gz minetest-0fa0e0752a28eeb43195f2288c018d5c0b24520b.tar.bz2 minetest-0fa0e0752a28eeb43195f2288c018d5c0b24520b.zip |
old water removed, some fixes here and there
Diffstat (limited to 'src/player.cpp')
-rw-r--r-- | src/player.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/player.cpp b/src/player.cpp index 72e44f0e0..bb25015b5 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -223,8 +223,10 @@ void LocalPlayer::move(f32 dtime, Map &map) position += m_speed * dtime; + bool haxmode = g_settings.getBool("haxmode"); + // Skip collision detection if player is non-local - if(isLocal() == false || HAXMODE) + if(isLocal() == false || haxmode) { setPosition(position); return; @@ -389,7 +391,9 @@ void LocalPlayer::applyControl(float dtime) v3f speed = v3f(0,0,0); - if(HAXMODE) + bool haxmode = g_settings.getBool("haxmode"); + + if(haxmode) { v3f speed = getSpeed(); speed.Y = 0; @@ -400,7 +404,7 @@ void LocalPlayer::applyControl(float dtime) bool superspeed = false; if(control.superspeed) { - if(HAXMODE) + if(haxmode) { v3f speed = getSpeed(); speed.Y = -20*BS; @@ -413,7 +417,7 @@ void LocalPlayer::applyControl(float dtime) } } - if(HAXMODE) + if(haxmode) superspeed = true; if(control.up) @@ -434,7 +438,7 @@ void LocalPlayer::applyControl(float dtime) } if(control.jump) { - if(HAXMODE) + if(haxmode) { v3f speed = getSpeed(); /*speed.Y += 20.*BS * dtime * 2; @@ -465,7 +469,7 @@ void LocalPlayer::applyControl(float dtime) f32 inc = walk_acceleration * BS * dtime; - if(HAXMODE) + if(haxmode) inc = walk_acceleration * BS * dtime * 10; // Accelerate to target speed with maximum increment |