add wiggle rotation nil check

This commit is contained in:
Juraj Vajda 2022-10-22 17:54:46 -04:00
parent 1b635974ab
commit f719b697e3

View File

@ -1262,6 +1262,8 @@ function XBowsEntityDef.on_step(self, selfObj, dtime)
---Wiggle
local rotation = selfObj.object:get_rotation()
if rotation then
local wiggle_timer_const = 0.05
local wiggle_timer = 0
@ -1289,6 +1291,8 @@ function XBowsEntityDef.on_step(self, selfObj, dtime)
end, selfObj.object, wiggle_timer)
end
end
---API callbacks
local on_hit_node_callback = self.registered_arrows[selfObj._arrow_name].custom.on_hit_node