Changed to use physics_manager

This commit is contained in:
Billy S 2018-12-15 21:49:51 -05:00 committed by GitHub
parent 5898351eee
commit 3b44b5e269
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -146,7 +146,7 @@ minetest.register_chatcommand("setspeed", {
return return
end end
player:set_physics_override(tonumber(speed), nil, nil) set_player_physics(player, {speed = tonumber(speed)}, 10, "playertools speed")
end, end,
}) })
@ -167,7 +167,7 @@ minetest.register_chatcommand("setgravity", {
minetest.chat_send_player(name, "This is not a number.") minetest.chat_send_player(name, "This is not a number.")
return return
end end
player:set_physics_override(nil, tonumber(gravity), nil) set_player_physics(player, {gravity = tonumber(gravity)}, 10, "playertools gravity")
end, end,
}) })
@ -188,7 +188,7 @@ minetest.register_chatcommand("setjump", {
minetest.chat_send_player(name, "This is not a number.") minetest.chat_send_player(name, "This is not a number.")
return return
end end
player:set_physics_override(nil, nil, jump_height) set_player_physics(player, {jump = tonumber(jump)}, 10, "playertools jump")
end, end,
}) })