mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2025-01-09 16:49:35 +01:00
Guard against undefined nodes
This commit is contained in:
parent
363187b0d6
commit
46ea9e98cc
1 changed files with 1 additions and 1 deletions
|
@ -385,7 +385,7 @@ local function do_movement_step(staticdata, dtime)
|
|||
if staticdata.distance == 0 then
|
||||
local next_node = core.get_node(staticdata.connected_at + staticdata.dir)
|
||||
local next_node_def = core.registered_nodes[next_node.name]
|
||||
if next_node_def and next_node_def.groups and (next_node_def.groups.solid or next_node_def.groups.stair) then
|
||||
if not next_node_def or next_node_def.groups and (next_node_def.groups.solid or next_node_def.groups.stair) then
|
||||
reverse_direction(staticdata)
|
||||
return 0
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue