mirror of
https://github.com/ElCeejo/creatura.git
synced 2025-07-08 07:40:31 -04:00
Small changes
This commit is contained in:
parent
4439348160
commit
8e8e5052b5
2 changed files with 11 additions and 5 deletions
3
api.lua
3
api.lua
|
@ -461,7 +461,8 @@ function creatura.basic_punch_func(self, puncher, tflp, tool_caps, dir)
|
|||
local dist = vec_dist(self.object:get_pos(), puncher:get_pos())
|
||||
dir.y = 0.2
|
||||
if self.touching_ground then
|
||||
self:apply_knockback(dir, (damage / dist) * 8)
|
||||
local power = clamp((damage / dist) * 8, 0, 8)
|
||||
self:apply_knockback(dir, power)
|
||||
end
|
||||
self:hurt(damage)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue