mirror of
https://github.com/moparisthebest/minetest
synced 2024-12-23 08:08:47 -05:00
Dont sneak while flying
This commit is contained in:
parent
52ba413185
commit
9786202b08
@ -159,7 +159,7 @@ void LocalPlayer::move(f32 dtime, Map &map, f32 pos_max_d,
|
|||||||
If sneaking, keep in range from the last walked node and don't
|
If sneaking, keep in range from the last walked node and don't
|
||||||
fall off from it
|
fall off from it
|
||||||
*/
|
*/
|
||||||
if(control.sneak && m_sneak_node_exists)
|
if(control.sneak && m_sneak_node_exists && !g_settings->getBool("free_move"))
|
||||||
{
|
{
|
||||||
f32 maxd = 0.5*BS + sneak_max;
|
f32 maxd = 0.5*BS + sneak_max;
|
||||||
v3f lwn_f = intToFloat(m_sneak_node, BS);
|
v3f lwn_f = intToFloat(m_sneak_node, BS);
|
||||||
@ -540,7 +540,7 @@ void LocalPlayer::applyControl(float dtime)
|
|||||||
// The speed of the player (Y is ignored)
|
// The speed of the player (Y is ignored)
|
||||||
if(superspeed)
|
if(superspeed)
|
||||||
speed = speed.normalize() * walkspeed_max * 5.0;
|
speed = speed.normalize() * walkspeed_max * 5.0;
|
||||||
else if(control.sneak)
|
else if(control.sneak && !free_move)
|
||||||
speed = speed.normalize() * walkspeed_max / 3.0;
|
speed = speed.normalize() * walkspeed_max / 3.0;
|
||||||
else
|
else
|
||||||
speed = speed.normalize() * walkspeed_max;
|
speed = speed.normalize() * walkspeed_max;
|
||||||
|
Loading…
Reference in New Issue
Block a user