aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs')
-rw-r--r--OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs175
1 files changed, 0 insertions, 175 deletions
diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs
deleted file mode 100644
index a133e51..0000000
--- a/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs
+++ /dev/null
@@ -1,175 +0,0 @@
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.CoreModules.World.Land;
34
35namespace OpenSim.Region.RegionCombinerModule
36{
37public class RegionCombinerLargeLandChannel : ILandChannel
38 {
39 // private static readonly ILog m_log =
40 // LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 private RegionData RegData;
42 private ILandChannel RootRegionLandChannel;
43 private readonly List<RegionData> RegionConnections;
44
45 #region ILandChannel Members
46
47 public RegionCombinerLargeLandChannel(RegionData regData, ILandChannel rootRegionLandChannel,
48 List<RegionData> regionConnections)
49 {
50 RegData = regData;
51 RootRegionLandChannel = rootRegionLandChannel;
52 RegionConnections = regionConnections;
53 }
54
55 public List<ILandObject> ParcelsNearPoint(Vector3 position)
56 {
57 //m_log.DebugFormat("[LANDPARCELNEARPOINT]: {0}>", position);
58 return RootRegionLandChannel.ParcelsNearPoint(position - RegData.Offset);
59 }
60
61 public List<ILandObject> AllParcels()
62 {
63 return RootRegionLandChannel.AllParcels();
64 }
65
66 public void Clear(bool setupDefaultParcel)
67 {
68 RootRegionLandChannel.Clear(setupDefaultParcel);
69 }
70
71 public ILandObject GetLandObject(int x, int y)
72 {
73 //m_log.DebugFormat("[BIGLANDTESTINT]: <{0},{1}>", x, y);
74
75 if (x > 0 && x <= (int)Constants.RegionSize && y > 0 && y <= (int)Constants.RegionSize)
76 {
77 return RootRegionLandChannel.GetLandObject(x, y);
78 }
79 else
80 {
81 int offsetX = (x / (int)Constants.RegionSize);
82 int offsetY = (y / (int)Constants.RegionSize);
83 offsetX *= (int)Constants.RegionSize;
84 offsetY *= (int)Constants.RegionSize;
85
86 foreach (RegionData regionData in RegionConnections)
87 {
88 if (regionData.Offset.X == offsetX && regionData.Offset.Y == offsetY)
89 {
90 return regionData.RegionScene.LandChannel.GetLandObject(x - offsetX, y - offsetY);
91 }
92 }
93 ILandObject obj = new LandObject(UUID.Zero, false, RegData.RegionScene);
94 obj.LandData.Name = "NO LAND";
95 return obj;
96 }
97 }
98
99 public ILandObject GetLandObject(int localID)
100 {
101 return RootRegionLandChannel.GetLandObject(localID);
102 }
103
104 public ILandObject GetLandObject(float x, float y)
105 {
106 //m_log.DebugFormat("[BIGLANDTESTFLOAT]: <{0},{1}>", x, y);
107
108 if (x > 0 && x <= (int)Constants.RegionSize && y > 0 && y <= (int)Constants.RegionSize)
109 {
110 return RootRegionLandChannel.GetLandObject(x, y);
111 }
112 else
113 {
114 int offsetX = (int)(x/(int) Constants.RegionSize);
115 int offsetY = (int)(y/(int) Constants.RegionSize);
116 offsetX *= (int) Constants.RegionSize;
117 offsetY *= (int) Constants.RegionSize;
118
119 foreach (RegionData regionData in RegionConnections)
120 {
121 if (regionData.Offset.X == offsetX && regionData.Offset.Y == offsetY)
122 {
123 return regionData.RegionScene.LandChannel.GetLandObject(x - offsetX, y - offsetY);
124 }
125 }
126
127 ILandObject obj = new LandObject(UUID.Zero, false, RegData.RegionScene);
128 obj.LandData.Name = "NO LAND";
129 return obj;
130 }
131 }
132
133 public bool IsForcefulBansAllowed()
134 {
135 return RootRegionLandChannel.IsForcefulBansAllowed();
136 }
137
138 public void UpdateLandObject(int localID, LandData data)
139 {
140 RootRegionLandChannel.UpdateLandObject(localID, data);
141 }
142
143 public void Join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id)
144 {
145 RootRegionLandChannel.Join(start_x, start_y, end_x, end_y, attempting_user_id);
146 }
147
148 public void Subdivide(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id)
149 {
150 RootRegionLandChannel.Subdivide(start_x, start_y, end_x, end_y, attempting_user_id);
151 }
152
153 public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient)
154 {
155 RootRegionLandChannel.ReturnObjectsInParcel(localID, returnType, agentIDs, taskIDs, remoteClient);
156 }
157
158 public void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel)
159 {
160 RootRegionLandChannel.setParcelObjectMaxOverride(overrideDel);
161 }
162
163 public void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel)
164 {
165 RootRegionLandChannel.setSimulatorObjectMaxOverride(overrideDel);
166 }
167
168 public void SetParcelOtherCleanTime(IClientAPI remoteClient, int localID, int otherCleanTime)
169 {
170 RootRegionLandChannel.SetParcelOtherCleanTime(remoteClient, localID, otherCleanTime);
171 }
172
173 #endregion
174 }
175} \ No newline at end of file