Mantis #7861. llEdgeOfWorld not working. Two reasons: (1) edge was being filled but not used; (2) region size was being ignored when computing the neighbors' coordinates.
Not sure if this is the intended semantics of this function, but it made sense in my varregion test with neighbors all around except in the South.LSLKeyTest
parent
d0c65d15dc
commit
c2e63e807e
|
@ -6409,7 +6409,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Y is the only valid direction
|
// Y is the only valid direction
|
||||||
edge.y = dir.y / Math.Abs(dir.y);
|
edge.y = dir.y / Math.Abs(dir.y) * (World.RegionInfo.RegionSizeY / Constants.RegionSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -6431,20 +6431,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
if (edge.y > World.RegionInfo.RegionSizeY || edge.y < 0)
|
if (edge.y > World.RegionInfo.RegionSizeY || edge.y < 0)
|
||||||
{
|
{
|
||||||
// Y goes out of bounds first
|
// Y goes out of bounds first
|
||||||
edge.y = dir.y / Math.Abs(dir.y);
|
edge.y = dir.y / Math.Abs(dir.y) * (World.RegionInfo.RegionSizeY / Constants.RegionSize);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// X goes out of bounds first or its a corner exit
|
// X goes out of bounds first or its a corner exit
|
||||||
edge.y = 0;
|
edge.y = 0;
|
||||||
edge.x = dir.x / Math.Abs(dir.x);
|
edge.x = dir.x / Math.Abs(dir.x) * (World.RegionInfo.RegionSizeY / Constants.RegionSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
List<GridRegion> neighbors = World.GridService.GetNeighbours(World.RegionInfo.ScopeID, World.RegionInfo.RegionID);
|
List<GridRegion> neighbors = World.GridService.GetNeighbours(World.RegionInfo.ScopeID, World.RegionInfo.RegionID);
|
||||||
|
|
||||||
uint neighborX = World.RegionInfo.RegionLocX + (uint)dir.x;
|
uint neighborX = World.RegionInfo.RegionLocX + (uint)edge.x;
|
||||||
uint neighborY = World.RegionInfo.RegionLocY + (uint)dir.y;
|
uint neighborY = World.RegionInfo.RegionLocY + (uint)edge.y;
|
||||||
|
|
||||||
foreach (GridRegion sri in neighbors)
|
foreach (GridRegion sri in neighbors)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue