diff options
Diffstat (limited to 'drive_entity.lua')
| -rw-r--r-- | drive_entity.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drive_entity.lua b/drive_entity.lua index edc47c6..5abc477 100644 --- a/drive_entity.lua +++ b/drive_entity.lua @@ -399,9 +399,12 @@ function celevator.drives.entity.nodestoentities(nodes,ename) ["celevator:car_door"] = true, ["celevator:tapehead"] = true, } + local donotattach = { + ["bike:bike"] = true, -- This mod crashes if this entity is attached + } if attachref:get_luaentity() and included[attachref:get_luaentity().name] then table.insert(refs,attachref) - elseif attachref:is_player() then + elseif attachref:is_player() and not attachref:get_attach() then local attachpos = attachref:get_pos() local basepos = eref:get_pos() local attachoffset = vector.subtract(attachpos,basepos) @@ -416,7 +419,7 @@ function celevator.drives.entity.nodestoentities(nodes,ename) zmin = zmin-extra, zmax = zmax+extra, } - else + elseif attachref:get_luaentity() and not (attachref:get_attach() or donotattach[attachref:get_luaentity().name or ""]) then local attachpos = attachref:get_pos() local basepos = eref:get_pos() local attachoffset = vector.subtract(attachpos,basepos) |
