Fixed issue #3087, sneak glitch.

This commit is contained in:
matkal-2 2015-10-11 12:45:49 +02:00
parent 3a4bcf35a1
commit 2ed5b8801c
1 changed files with 6 additions and 0 deletions

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