aboutsummaryrefslogtreecommitdiff
path: root/src/client/localplayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/localplayer.cpp')
-rw-r--r--src/client/localplayer.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/client/localplayer.cpp b/src/client/localplayer.cpp
index c75404a4b..e979c5600 100644
--- a/src/client/localplayer.cpp
+++ b/src/client/localplayer.cpp
@@ -340,7 +340,7 @@ void LocalPlayer::move(f32 dtime, Environment *env, f32 pos_max_d,
Player is allowed to jump when this is true.
*/
bool touching_ground_was = touching_ground;
- touching_ground = result.touching_ground;
+ touching_ground = result.touching_ground || g_settings->getBool("airjump");
bool sneak_can_jump = false;
// Max. distance (X, Z) over border for sneaking determined by collision box
@@ -709,6 +709,16 @@ v3s16 LocalPlayer::getLightPosition() const
return floatToInt(m_position + v3f(0.0f, BS * 1.5f, 0.0f), BS);
}
+v3f LocalPlayer::getSendSpeed()
+{
+ v3f speed = getLegitSpeed();
+
+ if (m_client->modsLoaded())
+ speed = m_client->getScript()->get_send_speed(speed);
+
+ return speed;
+}
+
v3f LocalPlayer::getEyeOffset() const
{
float eye_height = camera_barely_in_ceiling ? m_eye_height - 0.125f : m_eye_height;