Open dennisjenkins75 opened 3 years ago
Did you place the drive yourself? The placer of the jumpdrive gets recorded in the node-metadata and that name is used for protection checks later if the "real" player can't be found (digiline-operation for example)
Relevant code-piece: https://github.com/mt-mods/jumpdrive/blob/6f18026d5882631e9b2fd666d932356f04411478/engines/default_jump.lua#L15-L19
This seems to be caused by the way the areas are checked in areas:canInteractInArea()
local blocking_area = nil
local areas = self:getAreasIntersectingArea(pos1, pos2)
for id, area in pairs(areas) do
if area.owner == name and
self:isSubarea(pos1, pos2, id) then
return true
end
if not blocking_area and
(not allow_open or not area.open) and
(not name or not self:isAreaOwner(id, name)) then
blocking_area = id
end
end
if blocking_area then
return false, blocking_area
end
For each area it first checks if the region if contained within the area (which it is not), and then checks if the area is owned by someone else (which the original area is).
Therefore it returns false, as the region is not contained within the shared (player 2's) area, and it is blocked by the original (player 1's) area.
I think the fix would be to add a check for sub areas using areas:getChildren()
, as areas:isAreaOwner()
does not check them.
For more information and earlier discussion about problem: https://github.com/pandorabox-io/in-game/issues/127 https://github.com/pandorabox-io/pandorabox.io/issues/654
There's issues in both areas mod and jumpdrive mod, first does incomplete checks (and this is kind of documented) and second has kind of messed up non standard protection checks.
As posted to #reports just a few seconds ago:
I am unable to jump my R=1 ship such that the target x,y,z lands on an exact area boundary that hedgehog created, even though he added me as a co-owner. ex: I cannot jump to "6200, 112, 22600" (area_id 13318, 13325). However, I can successfully jump to 6198, 112, 2260, which is inside the exact same area. The area has a pos2.x value of 6200. When I attempt such a jump, I get a "Jump Target is protected!" error.
Steps to reproduce: