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")
|
||||
if v and v.y <= 0.1 and v.y >= -0.1 and invul == 0 then
|
||||
if dir.y <= 0.44 then
|
||||
player:add_velocity({
|
||||
x = 0,
|
||||
y = 4.5,
|
||||
z = 0
|
||||
})
|
||||
if mcl_enchanting.get_enchantment(wielditem, "knockback") == 0 then
|
||||
player:add_velocity({x = 0, y = 6.4, z = 0})
|
||||
else
|
||||
player:add_velocity({x = 0, y = 7, z = 0})
|
||||
end
|
||||
end
|
||||
-- add minimum knockback
|
||||
if knockback <= 1.5 then
|
||||
|
|
Loading…
Reference in New Issue