Make the vertical lift on pvp knockback similar to MC
parent
d7b10d18d8
commit
cd83305f07
|
@ -288,11 +288,11 @@ function minetest.calculate_knockback(player, hitter, time_from_last_punch, tool
|
||||||
local invul = player:get_meta():get_int("mcl_damage:invulnerable")
|
local invul = player:get_meta():get_int("mcl_damage:invulnerable")
|
||||||
if v and v.y <= 0.1 and v.y >= -0.1 and invul == 0 then
|
if v and v.y <= 0.1 and v.y >= -0.1 and invul == 0 then
|
||||||
if dir.y <= 0.44 then
|
if dir.y <= 0.44 then
|
||||||
player:add_velocity({
|
if mcl_enchanting.get_enchantment(wielditem, "knockback") == 0 then
|
||||||
x = 0,
|
player:add_velocity({x = 0, y = 6.4, z = 0})
|
||||||
y = 4.5,
|
else
|
||||||
z = 0
|
player:add_velocity({x = 0, y = 7, z = 0})
|
||||||
})
|
end
|
||||||
end
|
end
|
||||||
-- add minimum knockback
|
-- add minimum knockback
|
||||||
if knockback <= 1.5 then
|
if knockback <= 1.5 then
|
||||||
|
|
Loading…
Reference in New Issue