forked from VoxeLibre/VoxeLibre
Reduce explosion knockbacks when guarding
This commit is contained in:
parent
2b7c2e706a
commit
eca31c2fe3
|
@ -347,11 +347,15 @@ local function trace_explode(pos, strength, raydirs, radius, info, direct, sourc
|
|||
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() 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
|
||||
|
||||
-- Punch End Crystals to make them explode
|
||||
if ent and ent.name == "mcl_end:crystal" then
|
||||
|
|
Loading…
Reference in New Issue