Android stepheight: Only increase if 'touching ground' (#6313)
authorParamat <paramat@users.noreply.github.com>
Sat, 26 Aug 2017 06:45:09 +0000 (07:45 +0100)
committerLoïc Blot <nerzhul@users.noreply.github.com>
Sat, 26 Aug 2017 06:45:09 +0000 (08:45 +0200)
src/localplayer.cpp

index 9248494f745f99fe48c351421ba02c746bc4b5d5..2a098ba0a85d042dcf1c6e6a8bd998c85b162a3f 100644 (file)
@@ -285,7 +285,8 @@ void LocalPlayer::move(f32 dtime, Environment *env, f32 pos_max_d,
        // to all players, as this currently creates unintended special movement
        // abilities and advantages for Android players on a server.
 #ifdef __ANDROID__
-       player_stepheight += (0.6f * BS);
+       if (touching_ground)
+               player_stepheight += (0.6f * BS);
 #endif
 
        v3f accel_f = v3f(0,0,0);