I think I've isolated this is something odd in the crouch behaviour and the way it ineracts with slabs.
I stripped my mod right out of the equation and basically just added this to the player_api>>api.lua code were crouch is defined about line 118
Code: Select all
-- Determine if the player is sneaking, and reduce animation speed if so
if controls.sneak then
animation_speed_mod = animation_speed_mod / 2
player:set_properties({collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.45, 0.3}})
player:set_properties({eye_height = 1.37})
end
adding just that then pressing and holding sneak key down and trying to walk under slabs results in jamming halfway along the first slab. The above code acts like a permenant switch so if you let go of shift back out and then run through without holding shift down it works as expected. Make sure you have your slabs brackets on both sides by pillars of solid nodes otherwise you can slip along the open edge and everything appears okay.
However can also toss these lines in down walk/stand lines 131 to 140:
Code: Select all
if controls.LMB or controls.RMB then
player_set_animation(player, "walk_mine", animation_speed_mod)
else
player_set_animation(player, "walk", animation_speed_mod)
player:set_properties({collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3}})
player:set_properties({eye_height = 1.47})
end
elseif controls.LMB or controls.RMB then
player_set_animation(player, "mine", animation_speed_mod)
else
player_set_animation(player, "stand", animation_speed_mod)
player:set_properties({collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3}})
player:set_properties({eye_height = 1.47})
With the above code all in you can then test the second scenario which is hold shift down walk forward until jammed then let shift go while still walking forward you'll stutter over something then you can hold shift down again and you can then walk all the way along.
At the moment Im leaning towards some form of engine bug? since sneak seems to built into the engine core not in the minetest game itself....unless I missed something? very possible :).
I'll poke around a little more but Im not finding a lot of lua code that adds the crouch/sneak functionality. If I find nothing else I'll raise an issue and see if a dev or someone can look at it.
Edit: Should have added I coded a workaround for my purposes, hopefully I've made it tight enough it cant be exploited but its a workaround.