aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/World/Land/RegionCombinerClientEventForwarder.cs94
-rw-r--r--OpenSim/Region/CoreModules/World/Land/RegionCombinerIndividualEventForwarder.cs125
-rw-r--r--OpenSim/Region/CoreModules/World/Land/RegionCombinerLargeLandChannel.cs163
-rw-r--r--OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs563
-rw-r--r--OpenSim/Region/CoreModules/World/Land/RegionCombinerPermissionModule.cs275
-rw-r--r--OpenSim/Region/CoreModules/World/Land/RegionConnections.cs65
-rw-r--r--OpenSim/Region/CoreModules/World/Land/RegionCourseLocation.cs43
-rw-r--r--OpenSim/Region/CoreModules/World/Land/RegionData.cs39
8 files changed, 804 insertions, 563 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/RegionCombinerClientEventForwarder.cs b/OpenSim/Region/CoreModules/World/Land/RegionCombinerClientEventForwarder.cs
new file mode 100644
index 0000000..70d6de3
--- /dev/null
+++ b/OpenSim/Region/CoreModules/World/Land/RegionCombinerClientEventForwarder.cs
@@ -0,0 +1,94 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections.Generic;
30using OpenMetaverse;
31using OpenSim.Region.Framework.Scenes;
32
33namespace OpenSim.Region.CoreModules.World.Land
34{
35public class RegionCombinerClientEventForwarder
36 {
37 private Scene m_rootScene;
38 private Dictionary<UUID, Scene> m_virtScene = new Dictionary<UUID, Scene>();
39 private Dictionary<UUID,RegionCombinerIndividualEventForwarder> m_forwarders = new Dictionary<UUID,
40 RegionCombinerIndividualEventForwarder>();
41
42 public RegionCombinerClientEventForwarder(RegionConnections rootScene)
43 {
44 m_rootScene = rootScene.RegionScene;
45 }
46
47 public void AddSceneToEventForwarding(Scene virtualScene)
48 {
49 lock (m_virtScene)
50 {
51 if (m_virtScene.ContainsKey(virtualScene.RegionInfo.originRegionID))
52 {
53 m_virtScene[virtualScene.RegionInfo.originRegionID] = virtualScene;
54 }
55 else
56 {
57 m_virtScene.Add(virtualScene.RegionInfo.originRegionID, virtualScene);
58 }
59 }
60
61 lock (m_forwarders)
62 {
63 // TODO: Fix this to unregister if this happens
64 if (m_forwarders.ContainsKey(virtualScene.RegionInfo.originRegionID))
65 m_forwarders.Remove(virtualScene.RegionInfo.originRegionID);
66
67 RegionCombinerIndividualEventForwarder forwarder =
68 new RegionCombinerIndividualEventForwarder(m_rootScene, virtualScene);
69 m_forwarders.Add(virtualScene.RegionInfo.originRegionID, forwarder);
70
71 virtualScene.EventManager.OnNewClient += forwarder.ClientConnect;
72 virtualScene.EventManager.OnClientClosed += forwarder.ClientClosed;
73 }
74 }
75
76 public void RemoveSceneFromEventForwarding (Scene virtualScene)
77 {
78 lock (m_forwarders)
79 {
80 RegionCombinerIndividualEventForwarder forwarder = m_forwarders[virtualScene.RegionInfo.originRegionID];
81 virtualScene.EventManager.OnNewClient -= forwarder.ClientConnect;
82 virtualScene.EventManager.OnClientClosed -= forwarder.ClientClosed;
83 m_forwarders.Remove(virtualScene.RegionInfo.originRegionID);
84 }
85 lock (m_virtScene)
86 {
87 if (m_virtScene.ContainsKey(virtualScene.RegionInfo.originRegionID))
88 {
89 m_virtScene.Remove(virtualScene.RegionInfo.originRegionID);
90 }
91 }
92 }
93 }
94} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/World/Land/RegionCombinerIndividualEventForwarder.cs b/OpenSim/Region/CoreModules/World/Land/RegionCombinerIndividualEventForwarder.cs
new file mode 100644
index 0000000..65f22b1
--- /dev/null
+++ b/OpenSim/Region/CoreModules/World/Land/RegionCombinerIndividualEventForwarder.cs
@@ -0,0 +1,125 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using OpenMetaverse;
30using OpenSim.Framework;
31using OpenSim.Region.Framework.Scenes;
32
33namespace OpenSim.Region.CoreModules.World.Land
34{
35 public class RegionCombinerIndividualEventForwarder
36 {
37 private Scene m_rootScene;
38 private Scene m_virtScene;
39
40 public RegionCombinerIndividualEventForwarder(Scene rootScene, Scene virtScene)
41 {
42 m_rootScene = rootScene;
43 m_virtScene = virtScene;
44 }
45
46 public void ClientConnect(IClientAPI client)
47 {
48 m_virtScene.UnSubscribeToClientPrimEvents(client);
49 m_virtScene.UnSubscribeToClientPrimRezEvents(client);
50 m_virtScene.UnSubscribeToClientInventoryEvents(client);
51 m_virtScene.UnSubscribeToClientAttachmentEvents(client);
52 //m_virtScene.UnSubscribeToClientTeleportEvents(client);
53 m_virtScene.UnSubscribeToClientScriptEvents(client);
54 m_virtScene.UnSubscribeToClientGodEvents(client);
55 m_virtScene.UnSubscribeToClientNetworkEvents(client);
56
57 m_rootScene.SubscribeToClientPrimEvents(client);
58 client.OnAddPrim += LocalAddNewPrim;
59 client.OnRezObject += LocalRezObject;
60 m_rootScene.SubscribeToClientInventoryEvents(client);
61 m_rootScene.SubscribeToClientAttachmentEvents(client);
62 //m_rootScene.SubscribeToClientTeleportEvents(client);
63 m_rootScene.SubscribeToClientScriptEvents(client);
64 m_rootScene.SubscribeToClientGodEvents(client);
65 m_rootScene.SubscribeToClientNetworkEvents(client);
66 }
67
68 public void ClientClosed(UUID clientid, Scene scene)
69 {
70 }
71
72 /// <summary>
73 /// Fixes position based on the region the Rez event came in on
74 /// </summary>
75 /// <param name="remoteclient"></param>
76 /// <param name="itemid"></param>
77 /// <param name="rayend"></param>
78 /// <param name="raystart"></param>
79 /// <param name="raytargetid"></param>
80 /// <param name="bypassraycast"></param>
81 /// <param name="rayendisintersection"></param>
82 /// <param name="rezselected"></param>
83 /// <param name="removeitem"></param>
84 /// <param name="fromtaskid"></param>
85 private void LocalRezObject(IClientAPI remoteclient, UUID itemid, Vector3 rayend, Vector3 raystart,
86 UUID raytargetid, byte bypassraycast, bool rayendisintersection, bool rezselected, bool removeitem,
87 UUID fromtaskid)
88 {
89 int differenceX = (int)m_virtScene.RegionInfo.RegionLocX - (int)m_rootScene.RegionInfo.RegionLocX;
90 int differenceY = (int)m_virtScene.RegionInfo.RegionLocY - (int)m_rootScene.RegionInfo.RegionLocY;
91 rayend.X += differenceX * (int)Constants.RegionSize;
92 rayend.Y += differenceY * (int)Constants.RegionSize;
93 raystart.X += differenceX * (int)Constants.RegionSize;
94 raystart.Y += differenceY * (int)Constants.RegionSize;
95
96 m_rootScene.RezObject(remoteclient, itemid, rayend, raystart, raytargetid, bypassraycast,
97 rayendisintersection, rezselected, removeitem, fromtaskid);
98 }
99 /// <summary>
100 /// Fixes position based on the region the AddPrimShape event came in on
101 /// </summary>
102 /// <param name="ownerid"></param>
103 /// <param name="groupid"></param>
104 /// <param name="rayend"></param>
105 /// <param name="rot"></param>
106 /// <param name="shape"></param>
107 /// <param name="bypassraycast"></param>
108 /// <param name="raystart"></param>
109 /// <param name="raytargetid"></param>
110 /// <param name="rayendisintersection"></param>
111 private void LocalAddNewPrim(UUID ownerid, UUID groupid, Vector3 rayend, Quaternion rot,
112 PrimitiveBaseShape shape, byte bypassraycast, Vector3 raystart, UUID raytargetid,
113 byte rayendisintersection)
114 {
115 int differenceX = (int)m_virtScene.RegionInfo.RegionLocX - (int)m_rootScene.RegionInfo.RegionLocX;
116 int differenceY = (int)m_virtScene.RegionInfo.RegionLocY - (int)m_rootScene.RegionInfo.RegionLocY;
117 rayend.X += differenceX * (int)Constants.RegionSize;
118 rayend.Y += differenceY * (int)Constants.RegionSize;
119 raystart.X += differenceX * (int)Constants.RegionSize;
120 raystart.Y += differenceY * (int)Constants.RegionSize;
121 m_rootScene.AddNewPrim(ownerid, groupid, rayend, rot, shape, bypassraycast, raystart, raytargetid,
122 rayendisintersection);
123 }
124 }
125} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/World/Land/RegionCombinerLargeLandChannel.cs b/OpenSim/Region/CoreModules/World/Land/RegionCombinerLargeLandChannel.cs
new file mode 100644
index 0000000..9e46b94
--- /dev/null
+++ b/OpenSim/Region/CoreModules/World/Land/RegionCombinerLargeLandChannel.cs
@@ -0,0 +1,163 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections.Generic;
30using OpenMetaverse;
31using OpenSim.Framework;
32using OpenSim.Region.Framework.Interfaces;
33
34namespace OpenSim.Region.CoreModules.World.Land
35{
36public class RegionCombinerLargeLandChannel : ILandChannel
37 {
38 // private static readonly ILog m_log =
39 // LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
40 private RegionData RegData;
41 private ILandChannel RootRegionLandChannel;
42 private readonly List<RegionData> RegionConnections;
43
44 #region ILandChannel Members
45
46 public RegionCombinerLargeLandChannel(RegionData regData, ILandChannel rootRegionLandChannel,
47 List<RegionData> regionConnections)
48 {
49 RegData = regData;
50 RootRegionLandChannel = rootRegionLandChannel;
51 RegionConnections = regionConnections;
52 }
53
54 public List<ILandObject> ParcelsNearPoint(Vector3 position)
55 {
56 //m_log.DebugFormat("[LANDPARCELNEARPOINT]: {0}>", position);
57 return RootRegionLandChannel.ParcelsNearPoint(position - RegData.Offset);
58 }
59
60 public List<ILandObject> AllParcels()
61 {
62 return RootRegionLandChannel.AllParcels();
63 }
64
65 public ILandObject GetLandObject(int x, int y)
66 {
67 //m_log.DebugFormat("[BIGLANDTESTINT]: <{0},{1}>", x, y);
68
69 if (x > 0 && x <= (int)Constants.RegionSize && y > 0 && y <= (int)Constants.RegionSize)
70 {
71 return RootRegionLandChannel.GetLandObject(x, y);
72 }
73 else
74 {
75 int offsetX = (x / (int)Constants.RegionSize);
76 int offsetY = (y / (int)Constants.RegionSize);
77 offsetX *= (int)Constants.RegionSize;
78 offsetY *= (int)Constants.RegionSize;
79
80 foreach (RegionData regionData in RegionConnections)
81 {
82 if (regionData.Offset.X == offsetX && regionData.Offset.Y == offsetY)
83 {
84 return regionData.RegionScene.LandChannel.GetLandObject(x - offsetX, y - offsetY);
85 }
86 }
87 ILandObject obj = new LandObject(UUID.Zero, false, RegData.RegionScene);
88 obj.landData.Name = "NO LAND";
89 return obj;
90 }
91 }
92
93 public ILandObject GetLandObject(int localID)
94 {
95 return RootRegionLandChannel.GetLandObject(localID);
96 }
97
98 public ILandObject GetLandObject(float x, float y)
99 {
100 //m_log.DebugFormat("[BIGLANDTESTFLOAT]: <{0},{1}>", x, y);
101
102 if (x > 0 && x <= (int)Constants.RegionSize && y > 0 && y <= (int)Constants.RegionSize)
103 {
104 return RootRegionLandChannel.GetLandObject(x, y);
105 }
106 else
107 {
108 int offsetX = (int)(x/(int) Constants.RegionSize);
109 int offsetY = (int)(y/(int) Constants.RegionSize);
110 offsetX *= (int) Constants.RegionSize;
111 offsetY *= (int) Constants.RegionSize;
112
113 foreach (RegionData regionData in RegionConnections)
114 {
115 if (regionData.Offset.X == offsetX && regionData.Offset.Y == offsetY)
116 {
117 return regionData.RegionScene.LandChannel.GetLandObject(x - offsetX, y - offsetY);
118 }
119 }
120 ILandObject obj = new LandObject(UUID.Zero, false, RegData.RegionScene);
121 obj.landData.Name = "NO LAND";
122 return obj;
123 }
124 }
125
126 public bool IsLandPrimCountTainted()
127 {
128 return RootRegionLandChannel.IsLandPrimCountTainted();
129 }
130
131 public bool IsForcefulBansAllowed()
132 {
133 return RootRegionLandChannel.IsForcefulBansAllowed();
134 }
135
136 public void UpdateLandObject(int localID, LandData data)
137 {
138 RootRegionLandChannel.UpdateLandObject(localID, data);
139 }
140
141 public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient)
142 {
143 RootRegionLandChannel.ReturnObjectsInParcel(localID, returnType, agentIDs, taskIDs, remoteClient);
144 }
145
146 public void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel)
147 {
148 RootRegionLandChannel.setParcelObjectMaxOverride(overrideDel);
149 }
150
151 public void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel)
152 {
153 RootRegionLandChannel.setSimulatorObjectMaxOverride(overrideDel);
154 }
155
156 public void SetParcelOtherCleanTime(IClientAPI remoteClient, int localID, int otherCleanTime)
157 {
158 RootRegionLandChannel.SetParcelOtherCleanTime(remoteClient, localID, otherCleanTime);
159 }
160
161 #endregion
162 }
163} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs b/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs
index df2975b..98c7aa8 100644
--- a/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs
@@ -911,567 +911,4 @@ namespace OpenSim.Region.CoreModules.World.Land
911 VirtualRegion.Permissions.OnUseObjectReturn += BigRegion.PermissionModule.CanUseObjectReturn; //NOT YET IMPLEMENTED 911 VirtualRegion.Permissions.OnUseObjectReturn += BigRegion.PermissionModule.CanUseObjectReturn; //NOT YET IMPLEMENTED
912 } 912 }
913 } 913 }
914
915 public class RegionConnections
916 {
917 /// <summary>
918 /// Root Region ID
919 /// </summary>
920 public UUID RegionId;
921
922 /// <summary>
923 /// Root Region Scene
924 /// </summary>
925 public Scene RegionScene;
926
927 /// <summary>
928 /// LargeLandChannel for combined region
929 /// </summary>
930 public ILandChannel RegionLandChannel;
931 public uint X;
932 public uint Y;
933 public int XEnd;
934 public int YEnd;
935 public List<RegionData> ConnectedRegions;
936 public RegionCombinerPermissionModule PermissionModule;
937 public RegionCombinerClientEventForwarder ClientEventForwarder;
938 public void UpdateExtents(Vector3 extents)
939 {
940 XEnd = (int)extents.X;
941 YEnd = (int)extents.Y;
942 }
943 }
944
945 public class RegionData
946 {
947 public UUID RegionId;
948 public Scene RegionScene;
949 public Vector3 Offset;
950 }
951
952 struct RegionCourseLocationStruct
953 {
954 public List<Vector3> Locations;
955 public List<UUID> Uuids;
956 public IClientAPI UserAPI;
957 public Vector2 Offset;
958 }
959
960 public class RegionCombinerLargeLandChannel : ILandChannel
961 {
962 // private static readonly ILog m_log =
963 // LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
964 private RegionData RegData;
965 private ILandChannel RootRegionLandChannel;
966 private readonly List<RegionData> RegionConnections;
967
968 #region ILandChannel Members
969
970 public RegionCombinerLargeLandChannel(RegionData regData, ILandChannel rootRegionLandChannel,
971 List<RegionData> regionConnections)
972 {
973 RegData = regData;
974 RootRegionLandChannel = rootRegionLandChannel;
975 RegionConnections = regionConnections;
976 }
977
978 public List<ILandObject> ParcelsNearPoint(Vector3 position)
979 {
980 //m_log.DebugFormat("[LANDPARCELNEARPOINT]: {0}>", position);
981 return RootRegionLandChannel.ParcelsNearPoint(position - RegData.Offset);
982 }
983
984 public List<ILandObject> AllParcels()
985 {
986 return RootRegionLandChannel.AllParcels();
987 }
988
989 public ILandObject GetLandObject(int x, int y)
990 {
991 //m_log.DebugFormat("[BIGLANDTESTINT]: <{0},{1}>", x, y);
992
993 if (x > 0 && x <= (int)Constants.RegionSize && y > 0 && y <= (int)Constants.RegionSize)
994 {
995 return RootRegionLandChannel.GetLandObject(x, y);
996 }
997 else
998 {
999 int offsetX = (x / (int)Constants.RegionSize);
1000 int offsetY = (y / (int)Constants.RegionSize);
1001 offsetX *= (int)Constants.RegionSize;
1002 offsetY *= (int)Constants.RegionSize;
1003
1004 foreach (RegionData regionData in RegionConnections)
1005 {
1006 if (regionData.Offset.X == offsetX && regionData.Offset.Y == offsetY)
1007 {
1008 return regionData.RegionScene.LandChannel.GetLandObject(x - offsetX, y - offsetY);
1009 }
1010 }
1011 ILandObject obj = new LandObject(UUID.Zero, false, RegData.RegionScene);
1012 obj.landData.Name = "NO LAND";
1013 return obj;
1014 }
1015 }
1016
1017 public ILandObject GetLandObject(int localID)
1018 {
1019 return RootRegionLandChannel.GetLandObject(localID);
1020 }
1021
1022 public ILandObject GetLandObject(float x, float y)
1023 {
1024 //m_log.DebugFormat("[BIGLANDTESTFLOAT]: <{0},{1}>", x, y);
1025
1026 if (x > 0 && x <= (int)Constants.RegionSize && y > 0 && y <= (int)Constants.RegionSize)
1027 {
1028 return RootRegionLandChannel.GetLandObject(x, y);
1029 }
1030 else
1031 {
1032 int offsetX = (int)(x/(int) Constants.RegionSize);
1033 int offsetY = (int)(y/(int) Constants.RegionSize);
1034 offsetX *= (int) Constants.RegionSize;
1035 offsetY *= (int) Constants.RegionSize;
1036
1037 foreach (RegionData regionData in RegionConnections)
1038 {
1039 if (regionData.Offset.X == offsetX && regionData.Offset.Y == offsetY)
1040 {
1041 return regionData.RegionScene.LandChannel.GetLandObject(x - offsetX, y - offsetY);
1042 }
1043 }
1044 ILandObject obj = new LandObject(UUID.Zero, false, RegData.RegionScene);
1045 obj.landData.Name = "NO LAND";
1046 return obj;
1047 }
1048 }
1049
1050 public bool IsLandPrimCountTainted()
1051 {
1052 return RootRegionLandChannel.IsLandPrimCountTainted();
1053 }
1054
1055 public bool IsForcefulBansAllowed()
1056 {
1057 return RootRegionLandChannel.IsForcefulBansAllowed();
1058 }
1059
1060 public void UpdateLandObject(int localID, LandData data)
1061 {
1062 RootRegionLandChannel.UpdateLandObject(localID, data);
1063 }
1064
1065 public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient)
1066 {
1067 RootRegionLandChannel.ReturnObjectsInParcel(localID, returnType, agentIDs, taskIDs, remoteClient);
1068 }
1069
1070 public void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel)
1071 {
1072 RootRegionLandChannel.setParcelObjectMaxOverride(overrideDel);
1073 }
1074
1075 public void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel)
1076 {
1077 RootRegionLandChannel.setSimulatorObjectMaxOverride(overrideDel);
1078 }
1079
1080 public void SetParcelOtherCleanTime(IClientAPI remoteClient, int localID, int otherCleanTime)
1081 {
1082 RootRegionLandChannel.SetParcelOtherCleanTime(remoteClient, localID, otherCleanTime);
1083 }
1084
1085 #endregion
1086 }
1087
1088 public class RegionCombinerPermissionModule
1089 {
1090 private Scene m_rootScene;
1091
1092 public RegionCombinerPermissionModule(Scene RootScene)
1093 {
1094 m_rootScene = RootScene;
1095 }
1096
1097 #region Permission Override
1098
1099 public bool BypassPermissions()
1100 {
1101 return m_rootScene.Permissions.BypassPermissions();
1102 }
1103
1104 public void SetBypassPermissions(bool value)
1105 {
1106 m_rootScene.Permissions.SetBypassPermissions(value);
1107 }
1108
1109 public bool PropagatePermissions()
1110 {
1111 return m_rootScene.Permissions.PropagatePermissions();
1112 }
1113
1114 public uint GenerateClientFlags(UUID userid, UUID objectidid)
1115 {
1116 return m_rootScene.Permissions.GenerateClientFlags(userid,objectidid);
1117 }
1118
1119 public bool CanAbandonParcel(UUID user, ILandObject parcel, Scene scene)
1120 {
1121 return m_rootScene.Permissions.CanAbandonParcel(user,parcel);
1122 }
1123
1124 public bool CanReclaimParcel(UUID user, ILandObject parcel, Scene scene)
1125 {
1126 return m_rootScene.Permissions.CanReclaimParcel(user, parcel);
1127 }
1128
1129 public bool CanDeedParcel(UUID user, ILandObject parcel, Scene scene)
1130 {
1131 return m_rootScene.Permissions.CanDeedParcel(user, parcel);
1132 }
1133
1134 public bool CanDeedObject(UUID user, UUID @group, Scene scene)
1135 {
1136 return m_rootScene.Permissions.CanDeedObject(user,@group);
1137 }
1138
1139 public bool IsGod(UUID user, Scene requestfromscene)
1140 {
1141 return m_rootScene.Permissions.IsGod(user);
1142 }
1143
1144 public bool CanDuplicateObject(int objectcount, UUID objectid, UUID owner, Scene scene, Vector3 objectposition)
1145 {
1146 return m_rootScene.Permissions.CanDuplicateObject(objectcount, objectid, owner, objectposition);
1147 }
1148
1149 public bool CanDeleteObject(UUID objectid, UUID deleter, Scene scene)
1150 {
1151 return m_rootScene.Permissions.CanDeleteObject(objectid, deleter);
1152 }
1153
1154 public bool CanEditObject(UUID objectid, UUID editorid, Scene scene)
1155 {
1156 return m_rootScene.Permissions.CanEditObject(objectid, editorid);
1157 }
1158
1159 public bool CanEditParcel(UUID user, ILandObject parcel, Scene scene)
1160 {
1161 return m_rootScene.Permissions.CanEditParcel(user, parcel);
1162 }
1163
1164 public bool CanInstantMessage(UUID user, UUID target, Scene startscene)
1165 {
1166 return m_rootScene.Permissions.CanInstantMessage(user, target);
1167 }
1168
1169 public bool CanInventoryTransfer(UUID user, UUID target, Scene startscene)
1170 {
1171 return m_rootScene.Permissions.CanInventoryTransfer(user, target);
1172 }
1173
1174 public bool CanIssueEstateCommand(UUID user, Scene requestfromscene, bool ownercommand)
1175 {
1176 return m_rootScene.Permissions.CanIssueEstateCommand(user, ownercommand);
1177 }
1178
1179 public bool CanMoveObject(UUID objectid, UUID moverid, Scene scene)
1180 {
1181 return m_rootScene.Permissions.CanMoveObject(objectid, moverid);
1182 }
1183
1184 public bool CanObjectEntry(UUID objectid, bool enteringregion, Vector3 newpoint, Scene scene)
1185 {
1186 return m_rootScene.Permissions.CanObjectEntry(objectid, enteringregion, newpoint);
1187 }
1188
1189 public bool CanReturnObject(UUID objectid, UUID returnerid, Scene scene)
1190 {
1191 return m_rootScene.Permissions.CanReturnObject(objectid, returnerid);
1192 }
1193
1194 public bool CanRezObject(int objectcount, UUID owner, Vector3 objectposition, Scene scene)
1195 {
1196 return m_rootScene.Permissions.CanRezObject(objectcount, owner, objectposition);
1197 }
1198
1199 public bool CanRunConsoleCommand(UUID user, Scene requestfromscene)
1200 {
1201 return m_rootScene.Permissions.CanRunConsoleCommand(user);
1202 }
1203
1204 public bool CanRunScript(UUID script, UUID objectid, UUID user, Scene scene)
1205 {
1206 return m_rootScene.Permissions.CanRunScript(script, objectid, user);
1207 }
1208
1209 public bool CanCompileScript(UUID owneruuid, int scripttype, Scene scene)
1210 {
1211 return m_rootScene.Permissions.CanCompileScript(owneruuid, scripttype);
1212 }
1213
1214 public bool CanSellParcel(UUID user, ILandObject parcel, Scene scene)
1215 {
1216 return m_rootScene.Permissions.CanSellParcel(user, parcel);
1217 }
1218
1219 public bool CanTakeObject(UUID objectid, UUID stealer, Scene scene)
1220 {
1221 return m_rootScene.Permissions.CanTakeObject(objectid, stealer);
1222 }
1223
1224 public bool CanTakeCopyObject(UUID objectid, UUID userid, Scene inscene)
1225 {
1226 return m_rootScene.Permissions.CanTakeObject(objectid, userid);
1227 }
1228
1229 public bool CanTerraformLand(UUID user, Vector3 position, Scene requestfromscene)
1230 {
1231 return m_rootScene.Permissions.CanTerraformLand(user, position);
1232 }
1233
1234 public bool CanLinkObject(UUID user, UUID objectid)
1235 {
1236 return m_rootScene.Permissions.CanLinkObject(user, objectid);
1237 }
1238
1239 public bool CanDelinkObject(UUID user, UUID objectid)
1240 {
1241 return m_rootScene.Permissions.CanDelinkObject(user, objectid);
1242 }
1243
1244 public bool CanBuyLand(UUID user, ILandObject parcel, Scene scene)
1245 {
1246 return m_rootScene.Permissions.CanBuyLand(user, parcel);
1247 }
1248
1249 public bool CanViewNotecard(UUID script, UUID objectid, UUID user, Scene scene)
1250 {
1251 return m_rootScene.Permissions.CanViewNotecard(script, objectid, user);
1252 }
1253
1254 public bool CanViewScript(UUID script, UUID objectid, UUID user, Scene scene)
1255 {
1256 return m_rootScene.Permissions.CanViewScript(script, objectid, user);
1257 }
1258
1259 public bool CanEditNotecard(UUID notecard, UUID objectid, UUID user, Scene scene)
1260 {
1261 return m_rootScene.Permissions.CanEditNotecard(notecard, objectid, user);
1262 }
1263
1264 public bool CanEditScript(UUID script, UUID objectid, UUID user, Scene scene)
1265 {
1266 return m_rootScene.Permissions.CanEditScript(script, objectid, user);
1267 }
1268
1269 public bool CanCreateObjectInventory(int invtype, UUID objectid, UUID userid)
1270 {
1271 return m_rootScene.Permissions.CanCreateObjectInventory(invtype, objectid, userid);
1272 }
1273
1274 public bool CanEditObjectInventory(UUID objectid, UUID editorid, Scene scene)
1275 {
1276 return m_rootScene.Permissions.CanEditObjectInventory(objectid, editorid);
1277 }
1278
1279 public bool CanCopyObjectInventory(UUID itemid, UUID objectid, UUID userid)
1280 {
1281 return m_rootScene.Permissions.CanCopyObjectInventory(itemid, objectid, userid);
1282 }
1283
1284 public bool CanDeleteObjectInventory(UUID itemid, UUID objectid, UUID userid)
1285 {
1286 return m_rootScene.Permissions.CanDeleteObjectInventory(itemid, objectid, userid);
1287 }
1288
1289 public bool CanResetScript(UUID prim, UUID script, UUID user, Scene scene)
1290 {
1291 return m_rootScene.Permissions.CanResetScript(prim, script, user);
1292 }
1293
1294 public bool CanCreateUserInventory(int invtype, UUID userid)
1295 {
1296 return m_rootScene.Permissions.CanCreateUserInventory(invtype, userid);
1297 }
1298
1299 public bool CanCopyUserInventory(UUID itemid, UUID userid)
1300 {
1301 return m_rootScene.Permissions.CanCopyUserInventory(itemid, userid);
1302 }
1303
1304 public bool CanEditUserInventory(UUID itemid, UUID userid)
1305 {
1306 return m_rootScene.Permissions.CanEditUserInventory(itemid, userid);
1307 }
1308
1309 public bool CanDeleteUserInventory(UUID itemid, UUID userid)
1310 {
1311 return m_rootScene.Permissions.CanDeleteUserInventory(itemid, userid);
1312 }
1313
1314 public bool CanTeleport(UUID userid, Scene scene)
1315 {
1316 return m_rootScene.Permissions.CanTeleport(userid);
1317 }
1318
1319 public bool CanUseObjectReturn(ILandObject landdata, uint type, IClientAPI client, List<SceneObjectGroup> retlist, Scene scene)
1320 {
1321 return m_rootScene.Permissions.CanUseObjectReturn(landdata, type, client, retlist);
1322 }
1323
1324 #endregion
1325 }
1326
1327 public class RegionCombinerClientEventForwarder
1328 {
1329 private Scene m_rootScene;
1330 private Dictionary<UUID, Scene> m_virtScene = new Dictionary<UUID, Scene>();
1331 private Dictionary<UUID,RegionCombinerModuleIndividualForwarder> m_forwarders = new Dictionary<UUID,
1332 RegionCombinerModuleIndividualForwarder>();
1333
1334 public RegionCombinerClientEventForwarder(RegionConnections rootScene)
1335 {
1336 m_rootScene = rootScene.RegionScene;
1337 }
1338
1339 public void AddSceneToEventForwarding(Scene virtualScene)
1340 {
1341 lock (m_virtScene)
1342 {
1343 if (m_virtScene.ContainsKey(virtualScene.RegionInfo.originRegionID))
1344 {
1345 m_virtScene[virtualScene.RegionInfo.originRegionID] = virtualScene;
1346 }
1347 else
1348 {
1349 m_virtScene.Add(virtualScene.RegionInfo.originRegionID, virtualScene);
1350 }
1351 }
1352
1353 lock (m_forwarders)
1354 {
1355 // TODO: Fix this to unregister if this happens
1356 if (m_forwarders.ContainsKey(virtualScene.RegionInfo.originRegionID))
1357 m_forwarders.Remove(virtualScene.RegionInfo.originRegionID);
1358
1359 RegionCombinerModuleIndividualForwarder forwarder =
1360 new RegionCombinerModuleIndividualForwarder(m_rootScene, virtualScene);
1361 m_forwarders.Add(virtualScene.RegionInfo.originRegionID, forwarder);
1362
1363 virtualScene.EventManager.OnNewClient += forwarder.ClientConnect;
1364 virtualScene.EventManager.OnClientClosed += forwarder.ClientClosed;
1365 }
1366 }
1367
1368 public void RemoveSceneFromEventForwarding (Scene virtualScene)
1369 {
1370 lock (m_forwarders)
1371 {
1372 RegionCombinerModuleIndividualForwarder forwarder = m_forwarders[virtualScene.RegionInfo.originRegionID];
1373 virtualScene.EventManager.OnNewClient -= forwarder.ClientConnect;
1374 virtualScene.EventManager.OnClientClosed -= forwarder.ClientClosed;
1375 m_forwarders.Remove(virtualScene.RegionInfo.originRegionID);
1376 }
1377 lock (m_virtScene)
1378 {
1379 if (m_virtScene.ContainsKey(virtualScene.RegionInfo.originRegionID))
1380 {
1381 m_virtScene.Remove(virtualScene.RegionInfo.originRegionID);
1382 }
1383 }
1384 }
1385 }
1386
1387 public class RegionCombinerModuleIndividualForwarder
1388 {
1389 private Scene m_rootScene;
1390 private Scene m_virtScene;
1391
1392 public RegionCombinerModuleIndividualForwarder(Scene rootScene, Scene virtScene)
1393 {
1394 m_rootScene = rootScene;
1395 m_virtScene = virtScene;
1396 }
1397
1398 public void ClientConnect(IClientAPI client)
1399 {
1400 m_virtScene.UnSubscribeToClientPrimEvents(client);
1401 m_virtScene.UnSubscribeToClientPrimRezEvents(client);
1402 m_virtScene.UnSubscribeToClientInventoryEvents(client);
1403 m_virtScene.UnSubscribeToClientAttachmentEvents(client);
1404 //m_virtScene.UnSubscribeToClientTeleportEvents(client);
1405 m_virtScene.UnSubscribeToClientScriptEvents(client);
1406 m_virtScene.UnSubscribeToClientGodEvents(client);
1407 m_virtScene.UnSubscribeToClientNetworkEvents(client);
1408
1409 m_rootScene.SubscribeToClientPrimEvents(client);
1410 client.OnAddPrim += LocalAddNewPrim;
1411 client.OnRezObject += LocalRezObject;
1412 m_rootScene.SubscribeToClientInventoryEvents(client);
1413 m_rootScene.SubscribeToClientAttachmentEvents(client);
1414 //m_rootScene.SubscribeToClientTeleportEvents(client);
1415 m_rootScene.SubscribeToClientScriptEvents(client);
1416 m_rootScene.SubscribeToClientGodEvents(client);
1417 m_rootScene.SubscribeToClientNetworkEvents(client);
1418 }
1419
1420 public void ClientClosed(UUID clientid, Scene scene)
1421 {
1422 }
1423
1424 /// <summary>
1425 /// Fixes position based on the region the Rez event came in on
1426 /// </summary>
1427 /// <param name="remoteclient"></param>
1428 /// <param name="itemid"></param>
1429 /// <param name="rayend"></param>
1430 /// <param name="raystart"></param>
1431 /// <param name="raytargetid"></param>
1432 /// <param name="bypassraycast"></param>
1433 /// <param name="rayendisintersection"></param>
1434 /// <param name="rezselected"></param>
1435 /// <param name="removeitem"></param>
1436 /// <param name="fromtaskid"></param>
1437 private void LocalRezObject(IClientAPI remoteclient, UUID itemid, Vector3 rayend, Vector3 raystart,
1438 UUID raytargetid, byte bypassraycast, bool rayendisintersection, bool rezselected, bool removeitem,
1439 UUID fromtaskid)
1440 {
1441 int differenceX = (int)m_virtScene.RegionInfo.RegionLocX - (int)m_rootScene.RegionInfo.RegionLocX;
1442 int differenceY = (int)m_virtScene.RegionInfo.RegionLocY - (int)m_rootScene.RegionInfo.RegionLocY;
1443 rayend.X += differenceX * (int)Constants.RegionSize;
1444 rayend.Y += differenceY * (int)Constants.RegionSize;
1445 raystart.X += differenceX * (int)Constants.RegionSize;
1446 raystart.Y += differenceY * (int)Constants.RegionSize;
1447
1448 m_rootScene.RezObject(remoteclient, itemid, rayend, raystart, raytargetid, bypassraycast,
1449 rayendisintersection, rezselected, removeitem, fromtaskid);
1450 }
1451 /// <summary>
1452 /// Fixes position based on the region the AddPrimShape event came in on
1453 /// </summary>
1454 /// <param name="ownerid"></param>
1455 /// <param name="groupid"></param>
1456 /// <param name="rayend"></param>
1457 /// <param name="rot"></param>
1458 /// <param name="shape"></param>
1459 /// <param name="bypassraycast"></param>
1460 /// <param name="raystart"></param>
1461 /// <param name="raytargetid"></param>
1462 /// <param name="rayendisintersection"></param>
1463 private void LocalAddNewPrim(UUID ownerid, UUID groupid, Vector3 rayend, Quaternion rot,
1464 PrimitiveBaseShape shape, byte bypassraycast, Vector3 raystart, UUID raytargetid,
1465 byte rayendisintersection)
1466 {
1467 int differenceX = (int)m_virtScene.RegionInfo.RegionLocX - (int)m_rootScene.RegionInfo.RegionLocX;
1468 int differenceY = (int)m_virtScene.RegionInfo.RegionLocY - (int)m_rootScene.RegionInfo.RegionLocY;
1469 rayend.X += differenceX * (int)Constants.RegionSize;
1470 rayend.Y += differenceY * (int)Constants.RegionSize;
1471 raystart.X += differenceX * (int)Constants.RegionSize;
1472 raystart.Y += differenceY * (int)Constants.RegionSize;
1473 m_rootScene.AddNewPrim(ownerid, groupid, rayend, rot, shape, bypassraycast, raystart, raytargetid,
1474 rayendisintersection);
1475 }
1476 }
1477} 914}
diff --git a/OpenSim/Region/CoreModules/World/Land/RegionCombinerPermissionModule.cs b/OpenSim/Region/CoreModules/World/Land/RegionCombinerPermissionModule.cs
new file mode 100644
index 0000000..76ca5e3
--- /dev/null
+++ b/OpenSim/Region/CoreModules/World/Land/RegionCombinerPermissionModule.cs
@@ -0,0 +1,275 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections.Generic;
30using OpenMetaverse;
31using OpenSim.Framework;
32using OpenSim.Region.Framework.Interfaces;
33using OpenSim.Region.Framework.Scenes;
34
35namespace OpenSim.Region.CoreModules.World.Land
36{
37 public class RegionCombinerPermissionModule
38 {
39 private Scene m_rootScene;
40
41 public RegionCombinerPermissionModule(Scene RootScene)
42 {
43 m_rootScene = RootScene;
44 }
45
46 #region Permission Override
47
48 public bool BypassPermissions()
49 {
50 return m_rootScene.Permissions.BypassPermissions();
51 }
52
53 public void SetBypassPermissions(bool value)
54 {
55 m_rootScene.Permissions.SetBypassPermissions(value);
56 }
57
58 public bool PropagatePermissions()
59 {
60 return m_rootScene.Permissions.PropagatePermissions();
61 }
62
63 public uint GenerateClientFlags(UUID userid, UUID objectidid)
64 {
65 return m_rootScene.Permissions.GenerateClientFlags(userid,objectidid);
66 }
67
68 public bool CanAbandonParcel(UUID user, ILandObject parcel, Scene scene)
69 {
70 return m_rootScene.Permissions.CanAbandonParcel(user,parcel);
71 }
72
73 public bool CanReclaimParcel(UUID user, ILandObject parcel, Scene scene)
74 {
75 return m_rootScene.Permissions.CanReclaimParcel(user, parcel);
76 }
77
78 public bool CanDeedParcel(UUID user, ILandObject parcel, Scene scene)
79 {
80 return m_rootScene.Permissions.CanDeedParcel(user, parcel);
81 }
82
83 public bool CanDeedObject(UUID user, UUID @group, Scene scene)
84 {
85 return m_rootScene.Permissions.CanDeedObject(user,@group);
86 }
87
88 public bool IsGod(UUID user, Scene requestfromscene)
89 {
90 return m_rootScene.Permissions.IsGod(user);
91 }
92
93 public bool CanDuplicateObject(int objectcount, UUID objectid, UUID owner, Scene scene, Vector3 objectposition)
94 {
95 return m_rootScene.Permissions.CanDuplicateObject(objectcount, objectid, owner, objectposition);
96 }
97
98 public bool CanDeleteObject(UUID objectid, UUID deleter, Scene scene)
99 {
100 return m_rootScene.Permissions.CanDeleteObject(objectid, deleter);
101 }
102
103 public bool CanEditObject(UUID objectid, UUID editorid, Scene scene)
104 {
105 return m_rootScene.Permissions.CanEditObject(objectid, editorid);
106 }
107
108 public bool CanEditParcel(UUID user, ILandObject parcel, Scene scene)
109 {
110 return m_rootScene.Permissions.CanEditParcel(user, parcel);
111 }
112
113 public bool CanInstantMessage(UUID user, UUID target, Scene startscene)
114 {
115 return m_rootScene.Permissions.CanInstantMessage(user, target);
116 }
117
118 public bool CanInventoryTransfer(UUID user, UUID target, Scene startscene)
119 {
120 return m_rootScene.Permissions.CanInventoryTransfer(user, target);
121 }
122
123 public bool CanIssueEstateCommand(UUID user, Scene requestfromscene, bool ownercommand)
124 {
125 return m_rootScene.Permissions.CanIssueEstateCommand(user, ownercommand);
126 }
127
128 public bool CanMoveObject(UUID objectid, UUID moverid, Scene scene)
129 {
130 return m_rootScene.Permissions.CanMoveObject(objectid, moverid);
131 }
132
133 public bool CanObjectEntry(UUID objectid, bool enteringregion, Vector3 newpoint, Scene scene)
134 {
135 return m_rootScene.Permissions.CanObjectEntry(objectid, enteringregion, newpoint);
136 }
137
138 public bool CanReturnObject(UUID objectid, UUID returnerid, Scene scene)
139 {
140 return m_rootScene.Permissions.CanReturnObject(objectid, returnerid);
141 }
142
143 public bool CanRezObject(int objectcount, UUID owner, Vector3 objectposition, Scene scene)
144 {
145 return m_rootScene.Permissions.CanRezObject(objectcount, owner, objectposition);
146 }
147
148 public bool CanRunConsoleCommand(UUID user, Scene requestfromscene)
149 {
150 return m_rootScene.Permissions.CanRunConsoleCommand(user);
151 }
152
153 public bool CanRunScript(UUID script, UUID objectid, UUID user, Scene scene)
154 {
155 return m_rootScene.Permissions.CanRunScript(script, objectid, user);
156 }
157
158 public bool CanCompileScript(UUID owneruuid, int scripttype, Scene scene)
159 {
160 return m_rootScene.Permissions.CanCompileScript(owneruuid, scripttype);
161 }
162
163 public bool CanSellParcel(UUID user, ILandObject parcel, Scene scene)
164 {
165 return m_rootScene.Permissions.CanSellParcel(user, parcel);
166 }
167
168 public bool CanTakeObject(UUID objectid, UUID stealer, Scene scene)
169 {
170 return m_rootScene.Permissions.CanTakeObject(objectid, stealer);
171 }
172
173 public bool CanTakeCopyObject(UUID objectid, UUID userid, Scene inscene)
174 {
175 return m_rootScene.Permissions.CanTakeObject(objectid, userid);
176 }
177
178 public bool CanTerraformLand(UUID user, Vector3 position, Scene requestfromscene)
179 {
180 return m_rootScene.Permissions.CanTerraformLand(user, position);
181 }
182
183 public bool CanLinkObject(UUID user, UUID objectid)
184 {
185 return m_rootScene.Permissions.CanLinkObject(user, objectid);
186 }
187
188 public bool CanDelinkObject(UUID user, UUID objectid)
189 {
190 return m_rootScene.Permissions.CanDelinkObject(user, objectid);
191 }
192
193 public bool CanBuyLand(UUID user, ILandObject parcel, Scene scene)
194 {
195 return m_rootScene.Permissions.CanBuyLand(user, parcel);
196 }
197
198 public bool CanViewNotecard(UUID script, UUID objectid, UUID user, Scene scene)
199 {
200 return m_rootScene.Permissions.CanViewNotecard(script, objectid, user);
201 }
202
203 public bool CanViewScript(UUID script, UUID objectid, UUID user, Scene scene)
204 {
205 return m_rootScene.Permissions.CanViewScript(script, objectid, user);
206 }
207
208 public bool CanEditNotecard(UUID notecard, UUID objectid, UUID user, Scene scene)
209 {
210 return m_rootScene.Permissions.CanEditNotecard(notecard, objectid, user);
211 }
212
213 public bool CanEditScript(UUID script, UUID objectid, UUID user, Scene scene)
214 {
215 return m_rootScene.Permissions.CanEditScript(script, objectid, user);
216 }
217
218 public bool CanCreateObjectInventory(int invtype, UUID objectid, UUID userid)
219 {
220 return m_rootScene.Permissions.CanCreateObjectInventory(invtype, objectid, userid);
221 }
222
223 public bool CanEditObjectInventory(UUID objectid, UUID editorid, Scene scene)
224 {
225 return m_rootScene.Permissions.CanEditObjectInventory(objectid, editorid);
226 }
227
228 public bool CanCopyObjectInventory(UUID itemid, UUID objectid, UUID userid)
229 {
230 return m_rootScene.Permissions.CanCopyObjectInventory(itemid, objectid, userid);
231 }
232
233 public bool CanDeleteObjectInventory(UUID itemid, UUID objectid, UUID userid)
234 {
235 return m_rootScene.Permissions.CanDeleteObjectInventory(itemid, objectid, userid);
236 }
237
238 public bool CanResetScript(UUID prim, UUID script, UUID user, Scene scene)
239 {
240 return m_rootScene.Permissions.CanResetScript(prim, script, user);
241 }
242
243 public bool CanCreateUserInventory(int invtype, UUID userid)
244 {
245 return m_rootScene.Permissions.CanCreateUserInventory(invtype, userid);
246 }
247
248 public bool CanCopyUserInventory(UUID itemid, UUID userid)
249 {
250 return m_rootScene.Permissions.CanCopyUserInventory(itemid, userid);
251 }
252
253 public bool CanEditUserInventory(UUID itemid, UUID userid)
254 {
255 return m_rootScene.Permissions.CanEditUserInventory(itemid, userid);
256 }
257
258 public bool CanDeleteUserInventory(UUID itemid, UUID userid)
259 {
260 return m_rootScene.Permissions.CanDeleteUserInventory(itemid, userid);
261 }
262
263 public bool CanTeleport(UUID userid, Scene scene)
264 {
265 return m_rootScene.Permissions.CanTeleport(userid);
266 }
267
268 public bool CanUseObjectReturn(ILandObject landdata, uint type, IClientAPI client, List<SceneObjectGroup> retlist, Scene scene)
269 {
270 return m_rootScene.Permissions.CanUseObjectReturn(landdata, type, client, retlist);
271 }
272
273 #endregion
274 }
275} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/World/Land/RegionConnections.cs b/OpenSim/Region/CoreModules/World/Land/RegionConnections.cs
new file mode 100644
index 0000000..419ed74
--- /dev/null
+++ b/OpenSim/Region/CoreModules/World/Land/RegionConnections.cs
@@ -0,0 +1,65 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections.Generic;
30using OpenMetaverse;
31using OpenSim.Region.Framework.Interfaces;
32using OpenSim.Region.Framework.Scenes;
33
34namespace OpenSim.Region.CoreModules.World.Land
35{
36 public class RegionConnections
37 {
38 /// <summary>
39 /// Root Region ID
40 /// </summary>
41 public UUID RegionId;
42
43 /// <summary>
44 /// Root Region Scene
45 /// </summary>
46 public Scene RegionScene;
47
48 /// <summary>
49 /// LargeLandChannel for combined region
50 /// </summary>
51 public ILandChannel RegionLandChannel;
52 public uint X;
53 public uint Y;
54 public int XEnd;
55 public int YEnd;
56 public List<RegionData> ConnectedRegions;
57 public RegionCombinerPermissionModule PermissionModule;
58 public RegionCombinerClientEventForwarder ClientEventForwarder;
59 public void UpdateExtents(Vector3 extents)
60 {
61 XEnd = (int)extents.X;
62 YEnd = (int)extents.Y;
63 }
64 }
65} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/World/Land/RegionCourseLocation.cs b/OpenSim/Region/CoreModules/World/Land/RegionCourseLocation.cs
new file mode 100644
index 0000000..175ca89
--- /dev/null
+++ b/OpenSim/Region/CoreModules/World/Land/RegionCourseLocation.cs
@@ -0,0 +1,43 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections.Generic;
30using OpenMetaverse;
31using OpenSim.Framework;
32
33namespace OpenSim.Region.CoreModules.World.Land
34{
35
36 struct RegionCourseLocationStruct
37 {
38 public List<Vector3> Locations;
39 public List<UUID> Uuids;
40 public IClientAPI UserAPI;
41 public Vector2 Offset;
42 }
43} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/World/Land/RegionData.cs b/OpenSim/Region/CoreModules/World/Land/RegionData.cs
new file mode 100644
index 0000000..3383527
--- /dev/null
+++ b/OpenSim/Region/CoreModules/World/Land/RegionData.cs
@@ -0,0 +1,39 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using OpenMetaverse;
29using OpenSim.Region.Framework.Scenes;
30
31namespace OpenSim.Region.CoreModules.World.Land
32{
33 public class RegionData
34 {
35 public UUID RegionId;
36 public Scene RegionScene;
37 public Vector3 Offset;
38 }
39} \ No newline at end of file