aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs49
1 files changed, 37 insertions, 12 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 2909311..41fd1e1 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1976,6 +1976,23 @@ namespace OpenSim.Region.Framework.Scenes
1976 return; 1976 return;
1977 } 1977 }
1978 1978
1979 if (grp.RootPart.RETURN_AT_EDGE)
1980 {
1981 // We remove the object here
1982 try
1983 {
1984 List<SceneObjectGroup> objects = new List<SceneObjectGroup>();
1985 objects.Add(grp);
1986 SceneObjectGroup[] objectsArray = objects.ToArray();
1987 returnObjects(objectsArray, UUID.Zero);
1988 }
1989 catch (Exception)
1990 {
1991 m_log.Warn("[DATABASE]: exception when trying to return the prim that crossed the border.");
1992 }
1993 return;
1994 }
1995
1979 int thisx = (int)RegionInfo.RegionLocX; 1996 int thisx = (int)RegionInfo.RegionLocX;
1980 int thisy = (int)RegionInfo.RegionLocY; 1997 int thisy = (int)RegionInfo.RegionLocY;
1981 Vector3 EastCross = new Vector3(0.1f,0,0); 1998 Vector3 EastCross = new Vector3(0.1f,0,0);
@@ -2044,19 +2061,25 @@ namespace OpenSim.Region.Framework.Scenes
2044 Border crossedBordery = GetCrossedBorder(attemptedPosition + SouthCross, Cardinals.S); 2061 Border crossedBordery = GetCrossedBorder(attemptedPosition + SouthCross, Cardinals.S);
2045 //(crossedBorderx.BorderLine.Z / (int)Constants.RegionSize) 2062 //(crossedBorderx.BorderLine.Z / (int)Constants.RegionSize)
2046 2063
2047 if (crossedBordery.BorderLine.Z > 0) 2064 try
2048 { 2065 {
2049 pos.Y = ((pos.Y + crossedBordery.BorderLine.Z)); 2066 if (crossedBordery.BorderLine.Z > 0)
2050 changeY = (int)(crossedBordery.BorderLine.Z / (int)Constants.RegionSize); 2067 {
2051 } 2068 pos.Y = ((pos.Y + crossedBordery.BorderLine.Z));
2052 else 2069 changeY = (int)(crossedBordery.BorderLine.Z / (int)Constants.RegionSize);
2053 pos.Y = ((pos.Y + Constants.RegionSize)); 2070 }
2071 else
2072 pos.Y = ((pos.Y + Constants.RegionSize));
2054 2073
2055 newRegionHandle 2074 newRegionHandle
2056 = Util.UIntsToLong((uint)((thisx - changeX) * Constants.RegionSize), 2075 = Util.UIntsToLong((uint)((thisx - changeX) * Constants.RegionSize),
2057 (uint)((thisy + changeY) * Constants.RegionSize)); 2076 (uint)((thisy + changeY) * Constants.RegionSize));
2058 // x - 1 2077 // x - 1
2059 // y + 1 2078 // y + 1
2079 }
2080 catch (Exception ex)
2081 {
2082 }
2060 } 2083 }
2061 else 2084 else
2062 { 2085 {
@@ -2518,7 +2541,7 @@ namespace OpenSim.Region.Framework.Scenes
2518 AttachObject( 2541 AttachObject(
2519 sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition, false); 2542 sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition, false);
2520 RootPrim.RemFlag(PrimFlags.TemporaryOnRez); 2543 RootPrim.RemFlag(PrimFlags.TemporaryOnRez);
2521 grp.SendGroupFullUpdate(); 2544 grp.SendGroupFullUpdate();
2522 } 2545 }
2523 else 2546 else
2524 { 2547 {
@@ -2684,6 +2707,7 @@ namespace OpenSim.Region.Framework.Scenes
2684 client.OnGrabUpdate += ProcessObjectGrabUpdate; 2707 client.OnGrabUpdate += ProcessObjectGrabUpdate;
2685 client.OnDeGrabObject += ProcessObjectDeGrab; 2708 client.OnDeGrabObject += ProcessObjectDeGrab;
2686 client.OnUndo += m_sceneGraph.HandleUndo; 2709 client.OnUndo += m_sceneGraph.HandleUndo;
2710 client.OnRedo += m_sceneGraph.HandleRedo;
2687 client.OnObjectDescription += m_sceneGraph.PrimDescription; 2711 client.OnObjectDescription += m_sceneGraph.PrimDescription;
2688 client.OnObjectDrop += m_sceneGraph.DropObject; 2712 client.OnObjectDrop += m_sceneGraph.DropObject;
2689 client.OnObjectSaleInfo += ObjectSaleInfo; 2713 client.OnObjectSaleInfo += ObjectSaleInfo;
@@ -2838,6 +2862,7 @@ namespace OpenSim.Region.Framework.Scenes
2838 client.OnGrabObject -= ProcessObjectGrab; 2862 client.OnGrabObject -= ProcessObjectGrab;
2839 client.OnDeGrabObject -= ProcessObjectDeGrab; 2863 client.OnDeGrabObject -= ProcessObjectDeGrab;
2840 client.OnUndo -= m_sceneGraph.HandleUndo; 2864 client.OnUndo -= m_sceneGraph.HandleUndo;
2865 client.OnRedo -= m_sceneGraph.HandleRedo;
2841 client.OnObjectDescription -= m_sceneGraph.PrimDescription; 2866 client.OnObjectDescription -= m_sceneGraph.PrimDescription;
2842 client.OnObjectDrop -= m_sceneGraph.DropObject; 2867 client.OnObjectDrop -= m_sceneGraph.DropObject;
2843 client.OnObjectSaleInfo -= ObjectSaleInfo; 2868 client.OnObjectSaleInfo -= ObjectSaleInfo;