2017-10-20 12:28:16 -05:00
|
|
|
-- Enable the sneak glitch (horray!)
|
|
|
|
|
|
|
|
local use_old_code = minetest.settings:get_bool("sneak_glitch.use_old_code")
|
|
|
|
if use_old_code == nil then
|
|
|
|
-- Default to the new sneak code
|
|
|
|
use_old_code = false
|
|
|
|
end
|
|
|
|
|
|
|
|
minetest.register_on_joinplayer(function(player)
|
2018-12-15 21:45:24 -05:00
|
|
|
set_player_physics(player, {
|
2017-10-20 12:28:16 -05:00
|
|
|
sneak_glitch = true,
|
|
|
|
sneak = true,
|
2018-12-15 21:45:24 -05:00
|
|
|
new_move = not use_old_code}, 10, "enable sneak glitch")
|
2017-10-20 12:28:16 -05:00
|
|
|
end)
|