Fix knockback

This commit is contained in:
ElCeejo 2022-07-14 22:22:09 -07:00 committed by GitHub
parent af03272b9d
commit b6127c265f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -443,8 +443,7 @@ function creatura.basic_punch_func(self, puncher, time_from_last_punch, tool_cap
and is_value_in_table(self.immune_to, tool)) then
return
end
local dir = vec_multi(direction, -1)
self:apply_knockback(dir)
self:apply_knockback(direction)
self:hurt((tool_capabilities.damage_groups.fleshy or damage) or 2)
if random(4) < 2 then
self:play_sound("hurt")