Fixed a minor bug in the conveyor globalstep.

This commit is contained in:
rdococ 2017-08-01 22:03:56 +01:00
parent 8c6306d0fa
commit 3da823bfd7
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ minetest.register_globalstep(function (dtime)
local name = getname(surface)
local def = getdef(surface)
if def.groups.conveyor == 1 then -- I might replace this with a group, e.g. def.groups.conveyor, so you can set the speed.
if def and def.groups.conveyor == 1 then -- I might replace this with a group, e.g. def.groups.conveyor, so you can set the speed.
local facing = node.param2 -- Param2 is the facedir as defined above - conveyors face the opposite direction they move you.
local direction = minetest.facedir_to_dir(facing)
local movement = vector.multiply(direction, {x=1, y=1, z=1}) -- We reversed the facing system recently.