Compare commits

..

2 Commits

Author SHA1 Message Date
Daniel Cassidy cd190ed42f Add test command to dump autogroups data to console.
For testing only, do not merge this to master!
2022-01-09 02:51:25 +00:00
epCode 9b881df465 Temporarily remove glitchy Elytra crash-damage
If you fly in certain directions with this damage system, you will die. also if you speed up too fast.
2022-01-06 21:55:01 +00:00
2 changed files with 22 additions and 6 deletions

View File

@ -26,3 +26,25 @@ assert(minetest.get_modpath("_mcl_autogroup"), "This mod requires the mod _mcl_a
function mcl_autogroup.register_diggroup(group, def)
mcl_autogroup.registered_diggroups[group] = def or {}
end
-- Test code to demonstrate that on_mods_loaded branch works as expected.
-- Do not merge this code to master!
minetest.register_chatcommand("dump_autogroup", {
params = "",
description = "Dump data generated by mcl_autogroup to console",
privs = { privs = false },
func = function()
minetest.log("Registered nodes:")
for node_name, node_def in pairs(minetest.registered_nodes) do
minetest.log(node_name..": "..dump(node_def))
end
minetest.log("Registered tools:")
for tool_name, tool_def in pairs(minetest.registered_tools) do
minetest.log(tool_name..": "..dump(tool_def))
end
minetest.log("End dump")
end
})

View File

@ -173,12 +173,6 @@ minetest.register_globalstep(function(dtime)
and (fly_node == "air" or fly_node == "ignore")
if elytra.active then
if player_velocity.x < (player_velocity_old.x - 10) or player_velocity.x > (player_velocity_old.x + 10) and fly_node ~= "ignore" then
mcl_util.deal_damage(player, math.abs(player_velocity_old.x) * 0.2, {type = "fly_into_wall"})
end
if player_velocity.z < (player_velocity_old.z - 10) or player_velocity.z > (player_velocity_old.z + 10) and fly_node ~= "ignore" then
mcl_util.deal_damage(player, math.abs(player_velocity_old.z) * 0.2, {type = "fly_into_wall"})
end
mcl_player.player_set_animation(player, "fly")
if player_velocity.y < -1.5 then
player:add_velocity({x=0, y=0.17, z=0})