make kb amount rely on time from last punch
parent
b236f64cf7
commit
2d58b718c3
8
kb.lua
8
kb.lua
|
@ -1,3 +1,9 @@
|
|||
minetest.calculate_knockback = function(player, hitter, time_from_last_punch, tool_capabilities, dir, distance, damage)
|
||||
return 1
|
||||
if time_from_last_punch >= 1.5 then
|
||||
return 1.5
|
||||
elseif time_from_last_punch <= 1 and time_from_last_punch >= 0.5 then
|
||||
return 1
|
||||
else
|
||||
return 0.5
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue