Remove redundant knockback limiter
This commit is contained in:
parent
44c656502f
commit
d7ed37ef25
@ -311,7 +311,7 @@ function minetest.calculate_knockback(player, hitter, time_from_last_punch, tool
|
|||||||
local dir_dot = (hv.x * dir.x) + (hv.z * dir.z)
|
local dir_dot = (hv.x * dir.x) + (hv.z * dir.z)
|
||||||
local hitter_mag = math.sqrt((hv.x * hv.x) + (hv.z * hv.z))
|
local hitter_mag = math.sqrt((hv.x * hv.x) + (hv.z * hv.z))
|
||||||
local player_mag = math.sqrt((v.x * v.x) + (v.z * v.z))
|
local player_mag = math.sqrt((v.x * v.x) + (v.z * v.z))
|
||||||
if dir_dot > 0 and player_mag <= hitter_mag * 0.625 then
|
if dir_dot > 0 then
|
||||||
knockback = knockback + hitter_mag * 0.6875
|
knockback = knockback + hitter_mag * 0.6875
|
||||||
end
|
end
|
||||||
-- reduce floatiness
|
-- reduce floatiness
|
||||||
|
Loading…
Reference in New Issue
Block a user