diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 49 |
1 files changed, 37 insertions, 12 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 4d357fd..ab0d397 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2003,6 +2003,23 @@ namespace OpenSim.Region.Framework.Scenes | |||
2003 | return; | 2003 | return; |
2004 | } | 2004 | } |
2005 | 2005 | ||
2006 | if (grp.RootPart.RETURN_AT_EDGE) | ||
2007 | { | ||
2008 | // We remove the object here | ||
2009 | try | ||
2010 | { | ||
2011 | List<SceneObjectGroup> objects = new List<SceneObjectGroup>(); | ||
2012 | objects.Add(grp); | ||
2013 | SceneObjectGroup[] objectsArray = objects.ToArray(); | ||
2014 | returnObjects(objectsArray, UUID.Zero); | ||
2015 | } | ||
2016 | catch (Exception) | ||
2017 | { | ||
2018 | m_log.Warn("[DATABASE]: exception when trying to return the prim that crossed the border."); | ||
2019 | } | ||
2020 | return; | ||
2021 | } | ||
2022 | |||
2006 | int thisx = (int)RegionInfo.RegionLocX; | 2023 | int thisx = (int)RegionInfo.RegionLocX; |
2007 | int thisy = (int)RegionInfo.RegionLocY; | 2024 | int thisy = (int)RegionInfo.RegionLocY; |
2008 | Vector3 EastCross = new Vector3(0.1f,0,0); | 2025 | Vector3 EastCross = new Vector3(0.1f,0,0); |
@@ -2071,19 +2088,25 @@ namespace OpenSim.Region.Framework.Scenes | |||
2071 | Border crossedBordery = GetCrossedBorder(attemptedPosition + SouthCross, Cardinals.S); | 2088 | Border crossedBordery = GetCrossedBorder(attemptedPosition + SouthCross, Cardinals.S); |
2072 | //(crossedBorderx.BorderLine.Z / (int)Constants.RegionSize) | 2089 | //(crossedBorderx.BorderLine.Z / (int)Constants.RegionSize) |
2073 | 2090 | ||
2074 | if (crossedBordery.BorderLine.Z > 0) | 2091 | try |
2075 | { | 2092 | { |
2076 | pos.Y = ((pos.Y + crossedBordery.BorderLine.Z)); | 2093 | if (crossedBordery.BorderLine.Z > 0) |
2077 | changeY = (int)(crossedBordery.BorderLine.Z / (int)Constants.RegionSize); | 2094 | { |
2078 | } | 2095 | pos.Y = ((pos.Y + crossedBordery.BorderLine.Z)); |
2079 | else | 2096 | changeY = (int)(crossedBordery.BorderLine.Z / (int)Constants.RegionSize); |
2080 | pos.Y = ((pos.Y + Constants.RegionSize)); | 2097 | } |
2098 | else | ||
2099 | pos.Y = ((pos.Y + Constants.RegionSize)); | ||
2081 | 2100 | ||
2082 | newRegionHandle | 2101 | newRegionHandle |
2083 | = Util.UIntsToLong((uint)((thisx - changeX) * Constants.RegionSize), | 2102 | = Util.UIntsToLong((uint)((thisx - changeX) * Constants.RegionSize), |
2084 | (uint)((thisy + changeY) * Constants.RegionSize)); | 2103 | (uint)((thisy + changeY) * Constants.RegionSize)); |
2085 | // x - 1 | 2104 | // x - 1 |
2086 | // y + 1 | 2105 | // y + 1 |
2106 | } | ||
2107 | catch (Exception ex) | ||
2108 | { | ||
2109 | } | ||
2087 | } | 2110 | } |
2088 | else | 2111 | else |
2089 | { | 2112 | { |
@@ -2545,7 +2568,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2545 | AttachObject( | 2568 | AttachObject( |
2546 | sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition, false); | 2569 | sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition, false); |
2547 | RootPrim.RemFlag(PrimFlags.TemporaryOnRez); | 2570 | RootPrim.RemFlag(PrimFlags.TemporaryOnRez); |
2548 | grp.SendGroupFullUpdate(); | 2571 | grp.SendGroupFullUpdate(); |
2549 | } | 2572 | } |
2550 | else | 2573 | else |
2551 | { | 2574 | { |
@@ -2711,6 +2734,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2711 | client.OnGrabUpdate += ProcessObjectGrabUpdate; | 2734 | client.OnGrabUpdate += ProcessObjectGrabUpdate; |
2712 | client.OnDeGrabObject += ProcessObjectDeGrab; | 2735 | client.OnDeGrabObject += ProcessObjectDeGrab; |
2713 | client.OnUndo += m_sceneGraph.HandleUndo; | 2736 | client.OnUndo += m_sceneGraph.HandleUndo; |
2737 | client.OnRedo += m_sceneGraph.HandleRedo; | ||
2714 | client.OnObjectDescription += m_sceneGraph.PrimDescription; | 2738 | client.OnObjectDescription += m_sceneGraph.PrimDescription; |
2715 | client.OnObjectDrop += m_sceneGraph.DropObject; | 2739 | client.OnObjectDrop += m_sceneGraph.DropObject; |
2716 | client.OnObjectSaleInfo += ObjectSaleInfo; | 2740 | client.OnObjectSaleInfo += ObjectSaleInfo; |
@@ -2865,6 +2889,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2865 | client.OnGrabObject -= ProcessObjectGrab; | 2889 | client.OnGrabObject -= ProcessObjectGrab; |
2866 | client.OnDeGrabObject -= ProcessObjectDeGrab; | 2890 | client.OnDeGrabObject -= ProcessObjectDeGrab; |
2867 | client.OnUndo -= m_sceneGraph.HandleUndo; | 2891 | client.OnUndo -= m_sceneGraph.HandleUndo; |
2892 | client.OnRedo -= m_sceneGraph.HandleRedo; | ||
2868 | client.OnObjectDescription -= m_sceneGraph.PrimDescription; | 2893 | client.OnObjectDescription -= m_sceneGraph.PrimDescription; |
2869 | client.OnObjectDrop -= m_sceneGraph.DropObject; | 2894 | client.OnObjectDrop -= m_sceneGraph.DropObject; |
2870 | client.OnObjectSaleInfo -= ObjectSaleInfo; | 2895 | client.OnObjectSaleInfo -= ObjectSaleInfo; |