Page 1 of 1

sneak and sneak_glitch of set_physics_override don’t work

PostPosted: Sat Jul 05, 2014 23:32
by Wuzzy
Hi! I found the following in lua_api.txt:
The authors of lua_api.txt wrote:- set_physics_override({
speed = 1.0, -- multiplier to default value
jump = 1.0, -- multiplier to default value
gravity = 1.0, -- multiplier to default value
sneak = true, -- whether player can sneak
sneak_glitch = true, -- whether player can use the sneak glitch
})


However, if I use sneak=false or sneak_glitch=false, I can still sneak and use the sneak glitch.

Here is the code I used:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_on_respawnplayer(function(player)
   player:set_physics_override({sneak=false, sneak_glitch=false})
end)


I killed my player to respawn but I still could sneak and use the sneak glitch. To test I did not do it wrong, I also added speed=4 to the table, to test that set_physics_override works at all. This worked, I was faster on respawn.

Since the speed increased, but I still could sneak and use the sneak glitch, I suspect a bug here.

This does neither work in 0.4.9 nor in b8343cd11c834fb2613b104418ed08e9fdb1665a.

To reproduce, do the following: Create a new mod folder and copy the following code above into init.lua. Start a new world and enable the mod. Join the world. Die. Respawn. Check how fast you walk and wheather you can sneak and use the sneak glitch.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_on_respawnplayer(function(player)
   player:set_physics_override({sneak=false, sneak_glitch=false, speed=4})
end)

Re: sneak and sneak_glitch of set_physics_override don’t wor

PostPosted: Sun Aug 03, 2014 14:22
by 4aiman
One thing I know, is that using sneak_glitch=false in FM (didn't test it in MT) results in much harder pillar building: player should hit RMB at precise moment while jumping to actually place a node under him/her.

With sneak_glitch=true it's like "piece of cake".
But I definitely can use shift to jump over fences etc.

Re: sneak and sneak_glitch of set_physics_override don’t wor

PostPosted: Sat Sep 27, 2014 03:02
by Wuzzy