1
0
mirror of https://codeberg.org/tenplus1/mobs_redo.git synced 2024-12-23 17:20:22 +01:00

add sanity check to do_punch

This commit is contained in:
tenplus1 2020-04-11 17:51:15 +01:00
parent dde9896a1a
commit 9b0ff17101

View File

@ -2783,6 +2783,10 @@ function mob_class:on_punch(hitter, tflp, tool_capabilities, dir)
and tflp >= punch_interval then
local v = self.object:get_velocity()
-- sanity check
if not v then return end
local kb = damage or 1
local up = 2