add nil checks

This commit is contained in:
tenplus1 2024-03-12 08:36:44 +00:00
parent e972e9bf2e
commit 5596d2110b

View File

@ -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