Check item registered before getting group/drawtype

~ Minor update to check node is registered before trying to retrieve groups or drawtype
master
Sirrobzeroone 2022-08-15 21:12:08 +10:00
parent 728b65667f
commit 3fe36a13aa
6 changed files with 8 additions and 2 deletions

View File

@ -179,8 +179,14 @@ minetest.register_globalstep(function()
-- stop standing under slabs --
------------------------------- -- Whole section WIP needs cleanup
local ch = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z})
local ch_g = minetest.registered_nodes[ch.name].groups
local ch_d = minetest.registered_nodes[ch.name].drawtype
local ch_g = {}
local ch_d = "normal"
if minetest.registered_nodes[ch.name] then
local ch_g = minetest.registered_nodes[ch.name].groups
local ch_d = minetest.registered_nodes[ch.name].drawtype
end
local ch_slab = 0
local ch_node = 0
for k,v in pairs(ch_g) do

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
models/character_sf.blend1 Normal file

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 308 KiB

After

Width:  |  Height:  |  Size: 64 KiB