1
0
Fork 0

Reduce explosion knockbacks when guarding

This commit is contained in:
Eliy21 2024-01-26 16:11:47 +00:00
parent 2b7c2e706a
commit eca31c2fe3
1 changed files with 5 additions and 1 deletions

View File

@ -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 })
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