mirror of
https://github.com/joe7575/tubelib2.git
synced 2024-08-20 05:24:05 +02:00
bugfix from bugfix from bugfix
This commit is contained in:
parent
44eab11da5
commit
c40c9b6443
@ -213,8 +213,9 @@ function Tube:determine_tube_dirs(pos, preferred_pos, fdir)
|
|||||||
|
|
||||||
-- If the node at players "prefered position" is a tube,
|
-- If the node at players "prefered position" is a tube,
|
||||||
-- then the other side of the new tube shall point to the player.
|
-- then the other side of the new tube shall point to the player.
|
||||||
local npos, friendly = self:friendly_primary_node(preferred_pos)
|
if preferred_pos then
|
||||||
if preferred_pos and friendly then
|
local _, friendly = self:friendly_primary_node(preferred_pos)
|
||||||
|
if friendly then
|
||||||
local v = vector.direction(pos, preferred_pos)
|
local v = vector.direction(pos, preferred_pos)
|
||||||
local dir1
|
local dir1
|
||||||
if v.y > 0 then
|
if v.y > 0 then
|
||||||
@ -227,6 +228,7 @@ function Tube:determine_tube_dirs(pos, preferred_pos, fdir)
|
|||||||
local dir2 = Turn180Deg[fdir]
|
local dir2 = Turn180Deg[fdir]
|
||||||
return dir1, dir2, 1
|
return dir1, dir2, 1
|
||||||
end
|
end
|
||||||
|
end
|
||||||
-- Check for primary nodes (tubes)
|
-- Check for primary nodes (tubes)
|
||||||
for dir = 1,6 do
|
for dir = 1,6 do
|
||||||
if allowed[dir] then
|
if allowed[dir] then
|
||||||
|
Loading…
Reference in New Issue
Block a user