add wiggle rotation nil check
This commit is contained in:
parent
1b635974ab
commit
f719b697e3
4
api.lua
4
api.lua
|
@ -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
|
||||
|
||||
|
|
Ŝarĝante…
Reference in New Issue