mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-19 01:21:05 +01:00
Make the vertical lift on pvp knockback similar to MC
This commit is contained in:
parent
d7b10d18d8
commit
cd83305f07
1 changed files with 5 additions and 5 deletions
|
@ -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 a new issue