aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/LandManagement/Land.cs
diff options
context:
space:
mode:
authorlbsa712007-09-19 00:30:55 +0000
committerlbsa712007-09-19 00:30:55 +0000
commit8f0b03597b0bc8ea6873af9a55495407fae1ec56 (patch)
treef9f4de38379aebf2223ad4cb10a3d9ebcfa52a4f /OpenSim/Region/Environment/LandManagement/Land.cs
parent* Moved SendLogoutPacket back to IClientAPI. (diff)
downloadopensim-SC-8f0b03597b0bc8ea6873af9a55495407fae1ec56.zip
opensim-SC-8f0b03597b0bc8ea6873af9a55495407fae1ec56.tar.gz
opensim-SC-8f0b03597b0bc8ea6873af9a55495407fae1ec56.tar.bz2
opensim-SC-8f0b03597b0bc8ea6873af9a55495407fae1ec56.tar.xz
* Modernized ScriptManager to new interface-based module calls.
* 'remove redundant this qualifier' ftw
Diffstat (limited to 'OpenSim/Region/Environment/LandManagement/Land.cs')
-rw-r--r--OpenSim/Region/Environment/LandManagement/Land.cs149
1 files changed, 87 insertions, 62 deletions
diff --git a/OpenSim/Region/Environment/LandManagement/Land.cs b/OpenSim/Region/Environment/LandManagement/Land.cs
index a1d8885..4d36650 100644
--- a/OpenSim/Region/Environment/LandManagement/Land.cs
+++ b/OpenSim/Region/Environment/LandManagement/Land.cs
@@ -8,37 +8,40 @@ using OpenSim.Region.Environment.Scenes;
8 8
9namespace OpenSim.Region.Environment.LandManagement 9namespace OpenSim.Region.Environment.LandManagement
10{ 10{
11
11 #region Parcel Class 12 #region Parcel Class
13
12 /// <summary> 14 /// <summary>
13 /// Keeps track of a specific piece of land's information 15 /// Keeps track of a specific piece of land's information
14 /// </summary> 16 /// </summary>
15 public class Land 17 public class Land
16 { 18 {
17 #region Member Variables 19 #region Member Variables
20
18 public LandData landData = new LandData(); 21 public LandData landData = new LandData();
19 public List<SceneObjectGroup> primsOverMe = new List<SceneObjectGroup>(); 22 public List<SceneObjectGroup> primsOverMe = new List<SceneObjectGroup>();
20 23
21 public Scene m_scene; 24 public Scene m_scene;
22 25
23 private bool[,] landBitmap = new bool[64, 64]; 26 private bool[,] landBitmap = new bool[64,64];
24 27
25 #endregion 28 #endregion
26 29
27
28 #region Constructors 30 #region Constructors
31
29 public Land(LLUUID owner_id, bool is_group_owned, Scene scene) 32 public Land(LLUUID owner_id, bool is_group_owned, Scene scene)
30 { 33 {
31 m_scene = scene; 34 m_scene = scene;
32 landData.ownerID = owner_id; 35 landData.ownerID = owner_id;
33 landData.isGroupOwned = is_group_owned; 36 landData.isGroupOwned = is_group_owned;
34
35 } 37 }
36 #endregion
37 38
39 #endregion
38 40
39 #region Member Functions 41 #region Member Functions
40 42
41 #region General Functions 43 #region General Functions
44
42 /// <summary> 45 /// <summary>
43 /// Checks to see if this land object contains a point 46 /// Checks to see if this land object contains a point
44 /// </summary> 47 /// </summary>
@@ -49,7 +52,7 @@ namespace OpenSim.Region.Environment.LandManagement
49 { 52 {
50 if (x >= 0 && y >= 0 && x <= 256 && x <= 256) 53 if (x >= 0 && y >= 0 && x <= 256 && x <= 256)
51 { 54 {
52 return (landBitmap[x / 4, y / 4] == true); 55 return (landBitmap[x/4, y/4] == true);
53 } 56 }
54 else 57 else
55 { 58 {
@@ -59,10 +62,10 @@ namespace OpenSim.Region.Environment.LandManagement
59 62
60 public Land Copy() 63 public Land Copy()
61 { 64 {
62 Land newLand = new Land(this.landData.ownerID, this.landData.isGroupOwned, m_scene); 65 Land newLand = new Land(landData.ownerID, landData.isGroupOwned, m_scene);
63 66
64 //Place all new variables here! 67 //Place all new variables here!
65 newLand.landBitmap = (bool[,])(this.landBitmap.Clone()); 68 newLand.landBitmap = (bool[,]) (landBitmap.Clone());
66 newLand.landData = landData.Copy(); 69 newLand.landData = landData.Copy();
67 70
68 return newLand; 71 return newLand;
@@ -70,17 +73,17 @@ namespace OpenSim.Region.Environment.LandManagement
70 73
71 #endregion 74 #endregion
72 75
73
74 #region Packet Request Handling 76 #region Packet Request Handling
77
75 /// <summary> 78 /// <summary>
76 /// Sends land properties as requested 79 /// Sends land properties as requested
77 /// </summary> 80 /// </summary>
78 /// <param name="sequence_id">ID sent by client for them to keep track of</param> 81 /// <param name="sequence_id">ID sent by client for them to keep track of</param>
79 /// <param name="snap_selection">Bool sent by client for them to use</param> 82 /// <param name="snap_selection">Bool sent by client for them to use</param>
80 /// <param name="remote_client">Object representing the client</param> 83 /// <param name="remote_client">Object representing the client</param>
81 public void sendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client) 84 public void sendLandProperties(int sequence_id, bool snap_selection, int request_result,
85 IClientAPI remote_client)
82 { 86 {
83
84 ParcelPropertiesPacket updatePacket = new ParcelPropertiesPacket(); 87 ParcelPropertiesPacket updatePacket = new ParcelPropertiesPacket();
85 updatePacket.ParcelData.AABBMax = landData.AABBMax; 88 updatePacket.ParcelData.AABBMax = landData.AABBMax;
86 updatePacket.ParcelData.AABBMin = landData.AABBMin; 89 updatePacket.ParcelData.AABBMin = landData.AABBMin;
@@ -91,17 +94,20 @@ namespace OpenSim.Region.Environment.LandManagement
91 updatePacket.ParcelData.Bitmap = landData.landBitmapByteArray; 94 updatePacket.ParcelData.Bitmap = landData.landBitmapByteArray;
92 95
93 updatePacket.ParcelData.Desc = Helpers.StringToField(landData.landDesc); 96 updatePacket.ParcelData.Desc = Helpers.StringToField(landData.landDesc);
94 updatePacket.ParcelData.Category = (byte)landData.category; 97 updatePacket.ParcelData.Category = (byte) landData.category;
95 updatePacket.ParcelData.ClaimDate = landData.claimDate; 98 updatePacket.ParcelData.ClaimDate = landData.claimDate;
96 updatePacket.ParcelData.ClaimPrice = landData.claimPrice; 99 updatePacket.ParcelData.ClaimPrice = landData.claimPrice;
97 updatePacket.ParcelData.GroupID = landData.groupID; 100 updatePacket.ParcelData.GroupID = landData.groupID;
98 updatePacket.ParcelData.GroupPrims = landData.groupPrims; 101 updatePacket.ParcelData.GroupPrims = landData.groupPrims;
99 updatePacket.ParcelData.IsGroupOwned = landData.isGroupOwned; 102 updatePacket.ParcelData.IsGroupOwned = landData.isGroupOwned;
100 updatePacket.ParcelData.LandingType = (byte)landData.landingType; 103 updatePacket.ParcelData.LandingType = (byte) landData.landingType;
101 updatePacket.ParcelData.LocalID = landData.localID; 104 updatePacket.ParcelData.LocalID = landData.localID;
102 if (landData.area > 0) 105 if (landData.area > 0)
103 { 106 {
104 updatePacket.ParcelData.MaxPrims = Convert.ToInt32(Math.Round((Convert.ToDecimal(landData.area) / Convert.ToDecimal(65536)) * 15000 * Convert.ToDecimal(m_scene.RegionInfo.estateSettings.objectBonusFactor))); 107 updatePacket.ParcelData.MaxPrims =
108 Convert.ToInt32(
109 Math.Round((Convert.ToDecimal(landData.area)/Convert.ToDecimal(65536))*15000*
110 Convert.ToDecimal(m_scene.RegionInfo.estateSettings.objectBonusFactor)));
105 } 111 }
106 else 112 else
107 { 113 {
@@ -122,22 +128,29 @@ namespace OpenSim.Region.Environment.LandManagement
122 updatePacket.ParcelData.PassHours = landData.passHours; 128 updatePacket.ParcelData.PassHours = landData.passHours;
123 updatePacket.ParcelData.PassPrice = landData.passPrice; 129 updatePacket.ParcelData.PassPrice = landData.passPrice;
124 updatePacket.ParcelData.PublicCount = 0; //unemplemented 130 updatePacket.ParcelData.PublicCount = 0; //unemplemented
125 131
126 uint regionFlags = (uint)m_scene.RegionInfo.estateSettings.regionFlags; 132 uint regionFlags = (uint) m_scene.RegionInfo.estateSettings.regionFlags;
127 updatePacket.ParcelData.RegionDenyAnonymous = ((regionFlags & (uint)Simulator.RegionFlags.DenyAnonymous) > 0); 133 updatePacket.ParcelData.RegionDenyAnonymous = ((regionFlags & (uint) Simulator.RegionFlags.DenyAnonymous) >
128 updatePacket.ParcelData.RegionDenyIdentified = ((regionFlags & (uint)Simulator.RegionFlags.DenyIdentified) > 0); 134 0);
129 updatePacket.ParcelData.RegionDenyTransacted = ((regionFlags & (uint)Simulator.RegionFlags.DenyTransacted) > 0); 135 updatePacket.ParcelData.RegionDenyIdentified = ((regionFlags & (uint) Simulator.RegionFlags.DenyIdentified) >
130 updatePacket.ParcelData.RegionPushOverride = ((regionFlags & (uint)Simulator.RegionFlags.RestrictPushObject) > 0); 136 0);
131 137 updatePacket.ParcelData.RegionDenyTransacted = ((regionFlags & (uint) Simulator.RegionFlags.DenyTransacted) >
138 0);
139 updatePacket.ParcelData.RegionPushOverride = ((regionFlags & (uint) Simulator.RegionFlags.RestrictPushObject) >
140 0);
141
132 updatePacket.ParcelData.RentPrice = 0; 142 updatePacket.ParcelData.RentPrice = 0;
133 updatePacket.ParcelData.RequestResult = request_result; 143 updatePacket.ParcelData.RequestResult = request_result;
134 updatePacket.ParcelData.SalePrice = landData.salePrice; 144 updatePacket.ParcelData.SalePrice = landData.salePrice;
135 updatePacket.ParcelData.SelectedPrims = landData.selectedPrims; 145 updatePacket.ParcelData.SelectedPrims = landData.selectedPrims;
136 updatePacket.ParcelData.SelfCount = 0;//unemplemented 146 updatePacket.ParcelData.SelfCount = 0; //unemplemented
137 updatePacket.ParcelData.SequenceID = sequence_id; 147 updatePacket.ParcelData.SequenceID = sequence_id;
138 if (landData.simwideArea > 0) 148 if (landData.simwideArea > 0)
139 { 149 {
140 updatePacket.ParcelData.SimWideMaxPrims = Convert.ToInt32(Math.Round((Convert.ToDecimal(landData.simwideArea) / Convert.ToDecimal(65536)) * 15000 * Convert.ToDecimal(m_scene.RegionInfo.estateSettings.objectBonusFactor))); 150 updatePacket.ParcelData.SimWideMaxPrims =
151 Convert.ToInt32(
152 Math.Round((Convert.ToDecimal(landData.simwideArea)/Convert.ToDecimal(65536))*15000*
153 Convert.ToDecimal(m_scene.RegionInfo.estateSettings.objectBonusFactor)));
141 } 154 }
142 else 155 else
143 { 156 {
@@ -146,11 +159,12 @@ namespace OpenSim.Region.Environment.LandManagement
146 updatePacket.ParcelData.SimWideTotalPrims = landData.simwidePrims; 159 updatePacket.ParcelData.SimWideTotalPrims = landData.simwidePrims;
147 updatePacket.ParcelData.SnapSelection = snap_selection; 160 updatePacket.ParcelData.SnapSelection = snap_selection;
148 updatePacket.ParcelData.SnapshotID = landData.snapshotID; 161 updatePacket.ParcelData.SnapshotID = landData.snapshotID;
149 updatePacket.ParcelData.Status = (byte)landData.landStatus; 162 updatePacket.ParcelData.Status = (byte) landData.landStatus;
150 updatePacket.ParcelData.TotalPrims = landData.ownerPrims + landData.groupPrims + landData.otherPrims + landData.selectedPrims; 163 updatePacket.ParcelData.TotalPrims = landData.ownerPrims + landData.groupPrims + landData.otherPrims +
164 landData.selectedPrims;
151 updatePacket.ParcelData.UserLocation = landData.userLocation; 165 updatePacket.ParcelData.UserLocation = landData.userLocation;
152 updatePacket.ParcelData.UserLookAt = landData.userLookAt; 166 updatePacket.ParcelData.UserLookAt = landData.userLookAt;
153 remote_client.OutPacket((Packet)updatePacket); 167 remote_client.OutPacket((Packet) updatePacket);
154 } 168 }
155 169
156 public void updateLandProperties(ParcelPropertiesUpdatePacket packet, IClientAPI remote_client) 170 public void updateLandProperties(ParcelPropertiesUpdatePacket packet, IClientAPI remote_client)
@@ -159,7 +173,7 @@ namespace OpenSim.Region.Environment.LandManagement
159 { 173 {
160 //Needs later group support 174 //Needs later group support
161 landData.authBuyerID = packet.ParcelData.AuthBuyerID; 175 landData.authBuyerID = packet.ParcelData.AuthBuyerID;
162 landData.category = (libsecondlife.Parcel.ParcelCategory)packet.ParcelData.Category; 176 landData.category = (Parcel.ParcelCategory) packet.ParcelData.Category;
163 landData.landDesc = Helpers.FieldToUTF8String(packet.ParcelData.Desc); 177 landData.landDesc = Helpers.FieldToUTF8String(packet.ParcelData.Desc);
164 landData.groupID = packet.ParcelData.GroupID; 178 landData.groupID = packet.ParcelData.GroupID;
165 landData.landingType = packet.ParcelData.LandingType; 179 landData.landingType = packet.ParcelData.LandingType;
@@ -176,8 +190,6 @@ namespace OpenSim.Region.Environment.LandManagement
176 landData.userLocation = packet.ParcelData.UserLocation; 190 landData.userLocation = packet.ParcelData.UserLocation;
177 landData.userLookAt = packet.ParcelData.UserLookAt; 191 landData.userLookAt = packet.ParcelData.UserLookAt;
178 sendLandUpdateToAvatarsOverMe(); 192 sendLandUpdateToAvatarsOverMe();
179
180
181 } 193 }
182 } 194 }
183 195
@@ -186,17 +198,20 @@ namespace OpenSim.Region.Environment.LandManagement
186 List<ScenePresence> avatars = m_scene.RequestAvatarList(); 198 List<ScenePresence> avatars = m_scene.RequestAvatarList();
187 for (int i = 0; i < avatars.Count; i++) 199 for (int i = 0; i < avatars.Count; i++)
188 { 200 {
189 Land over = m_scene.LandManager.getLandObject((int)Math.Round(avatars[i].AbsolutePosition.X), (int)Math.Round(avatars[i].AbsolutePosition.Y)); 201 Land over =
190 if (over.landData.localID == this.landData.localID) 202 m_scene.LandManager.getLandObject((int) Math.Round(avatars[i].AbsolutePosition.X),
203 (int) Math.Round(avatars[i].AbsolutePosition.Y));
204 if (over.landData.localID == landData.localID)
191 { 205 {
192 sendLandProperties(0, false, 0, avatars[i].ControllingClient); 206 sendLandProperties(0, false, 0, avatars[i].ControllingClient);
193 } 207 }
194 } 208 }
195 } 209 }
196 #endregion
197 210
211 #endregion
198 212
199 #region Update Functions 213 #region Update Functions
214
200 /// <summary> 215 /// <summary>
201 /// Updates the AABBMin and AABBMax values after area/shape modification of the land object 216 /// Updates the AABBMin and AABBMax values after area/shape modification of the land object
202 /// </summary> 217 /// </summary>
@@ -222,8 +237,12 @@ namespace OpenSim.Region.Environment.LandManagement
222 } 237 }
223 } 238 }
224 } 239 }
225 landData.AABBMin = new LLVector3((float)(min_x * 4), (float)(min_y * 4), (float)m_scene.Terrain.GetHeight((min_x * 4), (min_y * 4))); 240 landData.AABBMin =
226 landData.AABBMax = new LLVector3((float)(max_x * 4), (float)(max_y * 4), (float)m_scene.Terrain.GetHeight((max_x * 4), (max_y * 4))); 241 new LLVector3((float) (min_x*4), (float) (min_y*4),
242 (float) m_scene.Terrain.GetHeight((min_x*4), (min_y*4)));
243 landData.AABBMax =
244 new LLVector3((float) (max_x*4), (float) (max_y*4),
245 (float) m_scene.Terrain.GetHeight((max_x*4), (max_y*4)));
227 landData.area = tempArea; 246 landData.area = tempArea;
228 } 247 }
229 248
@@ -237,18 +256,19 @@ namespace OpenSim.Region.Environment.LandManagement
237 /// </summary> 256 /// </summary>
238 public void forceUpdateLandInfo() 257 public void forceUpdateLandInfo()
239 { 258 {
240 this.updateAABBAndAreaValues(); 259 updateAABBAndAreaValues();
241 this.updateLandBitmapByteArray(); 260 updateLandBitmapByteArray();
242 } 261 }
243 262
244 public void setLandBitmapFromByteArray() 263 public void setLandBitmapFromByteArray()
245 { 264 {
246 landBitmap = convertBytesToLandBitmap(); 265 landBitmap = convertBytesToLandBitmap();
247 } 266 }
248 #endregion
249 267
268 #endregion
250 269
251 #region Land Bitmap Functions 270 #region Land Bitmap Functions
271
252 /// <summary> 272 /// <summary>
253 /// Sets the land's bitmap manually 273 /// Sets the land's bitmap manually
254 /// </summary> 274 /// </summary>
@@ -265,9 +285,9 @@ namespace OpenSim.Region.Environment.LandManagement
265 //Valid: Lets set it 285 //Valid: Lets set it
266 landBitmap = bitmap; 286 landBitmap = bitmap;
267 forceUpdateLandInfo(); 287 forceUpdateLandInfo();
268
269 } 288 }
270 } 289 }
290
271 /// <summary> 291 /// <summary>
272 /// Gets the land's bitmap manually 292 /// Gets the land's bitmap manually
273 /// </summary> 293 /// </summary>
@@ -276,6 +296,7 @@ namespace OpenSim.Region.Environment.LandManagement
276 { 296 {
277 return landBitmap; 297 return landBitmap;
278 } 298 }
299
279 /// <summary> 300 /// <summary>
280 /// Converts the land bitmap to a packet friendly byte array 301 /// Converts the land bitmap to a packet friendly byte array
281 /// </summary> 302 /// </summary>
@@ -290,11 +311,11 @@ namespace OpenSim.Region.Environment.LandManagement
290 { 311 {
291 for (x = 0; x < 64; x++) 312 for (x = 0; x < 64; x++)
292 { 313 {
293 tempByte = Convert.ToByte(tempByte | Convert.ToByte(landBitmap[x, y]) << (i++ % 8)); 314 tempByte = Convert.ToByte(tempByte | Convert.ToByte(landBitmap[x, y]) << (i++%8));
294 if (i % 8 == 0) 315 if (i%8 == 0)
295 { 316 {
296 tempConvertArr[byteNum] = tempByte; 317 tempConvertArr[byteNum] = tempByte;
297 tempByte = (byte)0; 318 tempByte = (byte) 0;
298 i = 0; 319 i = 0;
299 byteNum++; 320 byteNum++;
300 } 321 }
@@ -305,7 +326,7 @@ namespace OpenSim.Region.Environment.LandManagement
305 326
306 private bool[,] convertBytesToLandBitmap() 327 private bool[,] convertBytesToLandBitmap()
307 { 328 {
308 bool[,] tempConvertMap = new bool[64, 64]; 329 bool[,] tempConvertMap = new bool[64,64];
309 tempConvertMap.Initialize(); 330 tempConvertMap.Initialize();
310 byte tempByte = 0; 331 byte tempByte = 0;
311 int x = 0, y = 0, i = 0, bitNum = 0; 332 int x = 0, y = 0, i = 0, bitNum = 0;
@@ -314,7 +335,7 @@ namespace OpenSim.Region.Environment.LandManagement
314 tempByte = landData.landBitmapByteArray[i]; 335 tempByte = landData.landBitmapByteArray[i];
315 for (bitNum = 0; bitNum < 8; bitNum++) 336 for (bitNum = 0; bitNum < 8; bitNum++)
316 { 337 {
317 bool bit = Convert.ToBoolean(Convert.ToByte(tempByte >> bitNum) & (byte)1); 338 bool bit = Convert.ToBoolean(Convert.ToByte(tempByte >> bitNum) & (byte) 1);
318 tempConvertMap[x, y] = bit; 339 tempConvertMap[x, y] = bit;
319 x++; 340 x++;
320 if (x > 63) 341 if (x > 63)
@@ -322,12 +343,11 @@ namespace OpenSim.Region.Environment.LandManagement
322 x = 0; 343 x = 0;
323 y++; 344 y++;
324 } 345 }
325
326 } 346 }
327
328 } 347 }
329 return tempConvertMap; 348 return tempConvertMap;
330 } 349 }
350
331 /// <summary> 351 /// <summary>
332 /// Full sim land object creation 352 /// Full sim land object creation
333 /// </summary> 353 /// </summary>
@@ -347,8 +367,7 @@ namespace OpenSim.Region.Environment.LandManagement
347 /// <returns></returns> 367 /// <returns></returns>
348 public static bool[,] getSquareLandBitmap(int start_x, int start_y, int end_x, int end_y) 368 public static bool[,] getSquareLandBitmap(int start_x, int start_y, int end_x, int end_y)
349 { 369 {
350 370 bool[,] tempBitmap = new bool[64,64];
351 bool[,] tempBitmap = new bool[64, 64];
352 tempBitmap.Initialize(); 371 tempBitmap.Initialize();
353 372
354 tempBitmap = modifyLandBitmapSquare(tempBitmap, start_x, start_y, end_x, end_y, true); 373 tempBitmap = modifyLandBitmapSquare(tempBitmap, start_x, start_y, end_x, end_y, true);
@@ -365,7 +384,8 @@ namespace OpenSim.Region.Environment.LandManagement
365 /// <param name="end_y"></param> 384 /// <param name="end_y"></param>
366 /// <param name="set_value"></param> 385 /// <param name="set_value"></param>
367 /// <returns></returns> 386 /// <returns></returns>
368 public static bool[,] modifyLandBitmapSquare(bool[,] land_bitmap, int start_x, int start_y, int end_x, int end_y, bool set_value) 387 public static bool[,] modifyLandBitmapSquare(bool[,] land_bitmap, int start_x, int start_y, int end_x, int end_y,
388 bool set_value)
369 { 389 {
370 if (land_bitmap.GetLength(0) != 64 || land_bitmap.GetLength(1) != 64 || land_bitmap.Rank != 2) 390 if (land_bitmap.GetLength(0) != 64 || land_bitmap.GetLength(1) != 64 || land_bitmap.Rank != 2)
371 { 391 {
@@ -378,8 +398,8 @@ namespace OpenSim.Region.Environment.LandManagement
378 { 398 {
379 for (x = 0; x < 64; x++) 399 for (x = 0; x < 64; x++)
380 { 400 {
381 if (x >= start_x / 4 && x < end_x / 4 401 if (x >= start_x/4 && x < end_x/4
382 && y >= start_y / 4 && y < end_y / 4) 402 && y >= start_y/4 && y < end_y/4)
383 { 403 {
384 land_bitmap[x, y] = set_value; 404 land_bitmap[x, y] = set_value;
385 } 405 }
@@ -387,6 +407,7 @@ namespace OpenSim.Region.Environment.LandManagement
387 } 407 }
388 return land_bitmap; 408 return land_bitmap;
389 } 409 }
410
390 /// <summary> 411 /// <summary>
391 /// Join the true values of 2 bitmaps together 412 /// Join the true values of 2 bitmaps together
392 /// </summary> 413 /// </summary>
@@ -404,7 +425,6 @@ namespace OpenSim.Region.Environment.LandManagement
404 { 425 {
405 //Throw an exception - The bitmap is not 64x64 426 //Throw an exception - The bitmap is not 64x64
406 throw new Exception("Error: Invalid Parcel Bitmap - Bitmap_add in mergeLandBitmaps"); 427 throw new Exception("Error: Invalid Parcel Bitmap - Bitmap_add in mergeLandBitmaps");
407
408 } 428 }
409 429
410 int x, y; 430 int x, y;
@@ -420,9 +440,11 @@ namespace OpenSim.Region.Environment.LandManagement
420 } 440 }
421 return bitmap_base; 441 return bitmap_base;
422 } 442 }
443
423 #endregion 444 #endregion
424 445
425 #region Object Select and Object Owner Listing 446 #region Object Select and Object Owner Listing
447
426 public void sendForceObjectSelect(int local_id, int request_type, IClientAPI remote_client) 448 public void sendForceObjectSelect(int local_id, int request_type, IClientAPI remote_client)
427 { 449 {
428 List<uint> resultLocalIDs = new List<uint>(); 450 List<uint> resultLocalIDs = new List<uint>();
@@ -430,15 +452,16 @@ namespace OpenSim.Region.Environment.LandManagement
430 { 452 {
431 if (obj.LocalId > 0) 453 if (obj.LocalId > 0)
432 { 454 {
433 if (request_type == LandManager.LAND_SELECT_OBJECTS_OWNER && obj.OwnerID == this.landData.ownerID) 455 if (request_type == LandManager.LAND_SELECT_OBJECTS_OWNER && obj.OwnerID == landData.ownerID)
434 { 456 {
435 resultLocalIDs.Add(obj.LocalId); 457 resultLocalIDs.Add(obj.LocalId);
436 } 458 }
437 else if (request_type == LandManager.LAND_SELECT_OBJECTS_GROUP && false) //TODO: change false to group support! 459 else if (request_type == LandManager.LAND_SELECT_OBJECTS_GROUP && false)
460 //TODO: change false to group support!
438 { 461 {
439
440 } 462 }
441 else if (request_type == LandManager.LAND_SELECT_OBJECTS_OTHER && obj.OwnerID != remote_client.AgentId) 463 else if (request_type == LandManager.LAND_SELECT_OBJECTS_OTHER &&
464 obj.OwnerID != remote_client.AgentId)
442 { 465 {
443 resultLocalIDs.Add(obj.LocalId); 466 resultLocalIDs.Add(obj.LocalId);
444 } 467 }
@@ -479,10 +502,10 @@ namespace OpenSim.Region.Environment.LandManagement
479 resultLocalIDs.RemoveAt(0); 502 resultLocalIDs.RemoveAt(0);
480 } 503 }
481 pack.Data = data; 504 pack.Data = data;
482 remote_client.OutPacket((Packet)pack); 505 remote_client.OutPacket((Packet) pack);
483 } 506 }
484
485 } 507 }
508
486 public void sendLandObjectOwners(IClientAPI remote_client) 509 public void sendLandObjectOwners(IClientAPI remote_client)
487 { 510 {
488 Dictionary<LLUUID, int> ownersAndCount = new Dictionary<LLUUID, int>(); 511 Dictionary<LLUUID, int> ownersAndCount = new Dictionary<LLUUID, int>();
@@ -496,7 +519,6 @@ namespace OpenSim.Region.Environment.LandManagement
496 } 519 }
497 if (ownersAndCount.Count > 0) 520 if (ownersAndCount.Count > 0)
498 { 521 {
499
500 ParcelObjectOwnersReplyPacket.DataBlock[] dataBlock = new ParcelObjectOwnersReplyPacket.DataBlock[32]; 522 ParcelObjectOwnersReplyPacket.DataBlock[] dataBlock = new ParcelObjectOwnersReplyPacket.DataBlock[32];
501 523
502 if (ownersAndCount.Count < 32) 524 if (ownersAndCount.Count < 32)
@@ -522,19 +544,23 @@ namespace OpenSim.Region.Environment.LandManagement
522 remote_client.OutPacket(pack); 544 remote_client.OutPacket(pack);
523 } 545 }
524 } 546 }
547
525 #endregion 548 #endregion
526 549
527 #region Object Returning 550 #region Object Returning
551
528 public void returnObject(SceneObjectGroup obj) 552 public void returnObject(SceneObjectGroup obj)
529 { 553 {
530 } 554 }
555
531 public void returnLandObjects(int type, LLUUID owner) 556 public void returnLandObjects(int type, LLUUID owner)
532 { 557 {
533
534 } 558 }
559
535 #endregion 560 #endregion
536 561
537 #region Object Adding/Removing from Parcel 562 #region Object Adding/Removing from Parcel
563
538 public void resetLandPrimCounts() 564 public void resetLandPrimCounts()
539 { 565 {
540 landData.groupPrims = 0; 566 landData.groupPrims = 0;
@@ -566,7 +592,6 @@ namespace OpenSim.Region.Environment.LandManagement
566 } 592 }
567 593
568 primsOverMe.Add(obj); 594 primsOverMe.Add(obj);
569
570 } 595 }
571 596
572 public void removePrimFromCount(SceneObjectGroup obj) 597 public void removePrimFromCount(SceneObjectGroup obj)
@@ -592,11 +617,11 @@ namespace OpenSim.Region.Environment.LandManagement
592 primsOverMe.Remove(obj); 617 primsOverMe.Remove(obj);
593 } 618 }
594 } 619 }
595 #endregion
596 620
597 #endregion 621 #endregion
598 622
599 623 #endregion
600 } 624 }
625
601 #endregion 626 #endregion
602} 627} \ No newline at end of file