1
0
mirror of https://github.com/minetest/minetest.git synced 2025-07-06 01:40:21 +02:00

Fixed issue #3087, sneak glitch.

This commit is contained in:
matkal-2
2015-10-11 12:45:49 +02:00
parent 3a4bcf35a1
commit 2ed5b8801c

View File

@ -176,6 +176,12 @@ void LocalPlayer::move(f32 dtime, Environment *env, f32 pos_max_d,
// Maximum distance over border for sneaking
f32 sneak_max = BS*0.4;
// If not touching_ground then we cannot let player sneak
if (!touching_ground)
{
control.sneak = false;
}
/*
If sneaking, keep in range from the last walked node and don't
fall off from it