add nil checks
This commit is contained in:
parent
e972e9bf2e
commit
5596d2110b
@ -243,7 +243,7 @@ function nssm:putting_ability( --puts under the mob the block defined as 'p_blo
|
||||
max_vel --max velocity of the mob
|
||||
)
|
||||
|
||||
local v = self.object:get_velocity()
|
||||
local v = self.object:get_velocity() ; if not v then return end
|
||||
local dx = 0
|
||||
local dz = 0
|
||||
|
||||
@ -344,7 +344,7 @@ function nssm:midas_ability( --ability to transform every blocks it touches in
|
||||
height --height of the mob
|
||||
)
|
||||
|
||||
local v = self.object:get_velocity()
|
||||
local v = self.object:get_velocity() ; if not v then return end
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
if minetest.is_protected(pos, "") then
|
||||
|
Loading…
Reference in New Issue
Block a user