forked from VoxeLibre/VoxeLibre
Reduce explosion knockbacks when guarding
This commit is contained in:
parent
2b7c2e706a
commit
eca31c2fe3
|
@ -347,7 +347,11 @@ local function trace_explode(pos, strength, raydirs, radius, info, direct, sourc
|
||||||
mcl_util.deal_damage(obj, damage, { type = "explosion", direct = direct, source = source })
|
mcl_util.deal_damage(obj, damage, { type = "explosion", direct = direct, source = source })
|
||||||
|
|
||||||
if obj:is_player() or ent.tnt_knockback then
|
if obj:is_player() or ent.tnt_knockback then
|
||||||
obj:add_velocity(vector.multiply(punch_dir, impact * 20))
|
if obj:is_player() and mcl_shields and mcl_shields.is_blocking and mcl_shields.is_blocking(obj) then
|
||||||
|
obj:add_velocity(vector.multiply(punch_dir, impact * 10))
|
||||||
|
else
|
||||||
|
obj:add_velocity(vector.multiply(punch_dir, impact * 20))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue