diff options
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Land/LandObject.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Land/LandObject.cs | 132 |
1 files changed, 66 insertions, 66 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs index 02d74e5..8abfcf8 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs | |||
@@ -77,8 +77,8 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
77 | public LandObject(LLUUID owner_id, bool is_group_owned, Scene scene) | 77 | public LandObject(LLUUID owner_id, bool is_group_owned, Scene scene) |
78 | { | 78 | { |
79 | m_scene = scene; | 79 | m_scene = scene; |
80 | landData.ownerID = owner_id; | 80 | landData.OwnerID = owner_id; |
81 | landData.isGroupOwned = is_group_owned; | 81 | landData.IsGroupOwned = is_group_owned; |
82 | } | 82 | } |
83 | 83 | ||
84 | #endregion | 84 | #endregion |
@@ -107,7 +107,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
107 | 107 | ||
108 | public ILandObject Copy() | 108 | public ILandObject Copy() |
109 | { | 109 | { |
110 | ILandObject newLand = new LandObject(landData.ownerID, landData.isGroupOwned, m_scene); | 110 | ILandObject newLand = new LandObject(landData.OwnerID, landData.IsGroupOwned, m_scene); |
111 | 111 | ||
112 | //Place all new variables here! | 112 | //Place all new variables here! |
113 | newLand.landBitmap = (bool[,]) (landBitmap.Clone()); | 113 | newLand.landBitmap = (bool[,]) (landBitmap.Clone()); |
@@ -139,7 +139,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
139 | { | 139 | { |
140 | //Normal Calculations | 140 | //Normal Calculations |
141 | return Convert.ToInt32( | 141 | return Convert.ToInt32( |
142 | Math.Round((Convert.ToDecimal(landData.area) / Convert.ToDecimal(65536)) * m_scene.objectCapacity * | 142 | Math.Round((Convert.ToDecimal(landData.Area) / Convert.ToDecimal(65536)) * m_scene.objectCapacity * |
143 | Convert.ToDecimal(m_scene.RegionInfo.RegionSettings.ObjectBonus))); ; | 143 | Convert.ToDecimal(m_scene.RegionInfo.RegionSettings.ObjectBonus))); ; |
144 | } | 144 | } |
145 | } | 145 | } |
@@ -165,9 +165,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
165 | uint regionFlags = 336723974 & ~((uint)(Simulator.RegionFlags.AllowLandmark | Simulator.RegionFlags.AllowSetHome)); | 165 | uint regionFlags = 336723974 & ~((uint)(Simulator.RegionFlags.AllowLandmark | Simulator.RegionFlags.AllowSetHome)); |
166 | if (estateModule != null) | 166 | if (estateModule != null) |
167 | regionFlags = estateModule.GetRegionFlags(); | 167 | regionFlags = estateModule.GetRegionFlags(); |
168 | if ((landData.landFlags & (uint)Parcel.ParcelFlags.AllowLandmark) != 0) | 168 | if ((landData.Flags & (uint)Parcel.ParcelFlags.AllowLandmark) != 0) |
169 | regionFlags |= (uint)Simulator.RegionFlags.AllowLandmark; | 169 | regionFlags |= (uint)Simulator.RegionFlags.AllowLandmark; |
170 | if (landData.ownerID == remote_client.AgentId) | 170 | if (landData.OwnerID == remote_client.AgentId) |
171 | regionFlags |= (uint)Simulator.RegionFlags.AllowSetHome; | 171 | regionFlags |= (uint)Simulator.RegionFlags.AllowSetHome; |
172 | remote_client.SendLandProperties(remote_client, sequence_id, | 172 | remote_client.SendLandProperties(remote_client, sequence_id, |
173 | snap_selection, request_result, landData, | 173 | snap_selection, request_result, landData, |
@@ -183,31 +183,31 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
183 | //Needs later group support | 183 | //Needs later group support |
184 | LandData newData = landData.Copy(); | 184 | LandData newData = landData.Copy(); |
185 | 185 | ||
186 | if (args.AuthBuyerID != newData.authBuyerID || args.SalePrice != newData.salePrice) | 186 | if (args.AuthBuyerID != newData.AuthBuyerID || args.SalePrice != newData.SalePrice) |
187 | { | 187 | { |
188 | if (m_scene.ExternalChecks.ExternalChecksCanSellParcel(remote_client.AgentId, this)) | 188 | if (m_scene.ExternalChecks.ExternalChecksCanSellParcel(remote_client.AgentId, this)) |
189 | { | 189 | { |
190 | newData.authBuyerID = args.AuthBuyerID; | 190 | newData.AuthBuyerID = args.AuthBuyerID; |
191 | newData.salePrice = args.SalePrice; | 191 | newData.SalePrice = args.SalePrice; |
192 | } | 192 | } |
193 | } | 193 | } |
194 | newData.category = args.Category; | 194 | newData.Category = args.Category; |
195 | newData.landDesc = args.Desc; | 195 | newData.Description = args.Desc; |
196 | newData.groupID = args.GroupID; | 196 | newData.GroupID = args.GroupID; |
197 | newData.landingType = args.LandingType; | 197 | newData.LandingType = args.LandingType; |
198 | newData.mediaAutoScale = args.MediaAutoScale; | 198 | newData.MediaAutoScale = args.MediaAutoScale; |
199 | newData.mediaID = args.MediaID; | 199 | newData.MediaID = args.MediaID; |
200 | newData.mediaURL = args.MediaURL; | 200 | newData.MediaURL = args.MediaURL; |
201 | newData.musicURL = args.MusicURL; | 201 | newData.MusicURL = args.MusicURL; |
202 | newData.landName = args.Name; | 202 | newData.Name = args.Name; |
203 | newData.landFlags = args.ParcelFlags; | 203 | newData.Flags = args.ParcelFlags; |
204 | newData.passHours = args.PassHours; | 204 | newData.PassHours = args.PassHours; |
205 | newData.passPrice = args.PassPrice; | 205 | newData.PassPrice = args.PassPrice; |
206 | newData.snapshotID = args.SnapshotID; | 206 | newData.SnapshotID = args.SnapshotID; |
207 | newData.userLocation = args.UserLocation; | 207 | newData.UserLocation = args.UserLocation; |
208 | newData.userLookAt = args.UserLookAt; | 208 | newData.UserLookAt = args.UserLookAt; |
209 | 209 | ||
210 | m_scene.LandChannel.UpdateLandObject(landData.localID, newData); | 210 | m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData); |
211 | 211 | ||
212 | sendLandUpdateToAvatarsOverMe(); | 212 | sendLandUpdateToAvatarsOverMe(); |
213 | } | 213 | } |
@@ -216,16 +216,16 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
216 | public void updateLandSold(LLUUID avatarID, LLUUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area) | 216 | public void updateLandSold(LLUUID avatarID, LLUUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area) |
217 | { | 217 | { |
218 | LandData newData = landData.Copy(); | 218 | LandData newData = landData.Copy(); |
219 | newData.ownerID = avatarID; | 219 | newData.OwnerID = avatarID; |
220 | newData.groupID = groupID; | 220 | newData.GroupID = groupID; |
221 | newData.isGroupOwned = groupOwned; | 221 | newData.IsGroupOwned = groupOwned; |
222 | //newData.auctionID = AuctionID; | 222 | //newData.auctionID = AuctionID; |
223 | newData.claimDate = Util.UnixTimeSinceEpoch(); | 223 | newData.ClaimDate = Util.UnixTimeSinceEpoch(); |
224 | newData.claimPrice = claimprice; | 224 | newData.ClaimPrice = claimprice; |
225 | newData.salePrice = 0; | 225 | newData.SalePrice = 0; |
226 | newData.authBuyerID = LLUUID.Zero; | 226 | newData.AuthBuyerID = LLUUID.Zero; |
227 | newData.landFlags &= ~(uint) (Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects); | 227 | newData.Flags &= ~(uint) (Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects); |
228 | m_scene.LandChannel.UpdateLandObject(landData.localID, newData); | 228 | m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData); |
229 | 229 | ||
230 | sendLandUpdateToAvatarsOverMe(); | 230 | sendLandUpdateToAvatarsOverMe(); |
231 | } | 231 | } |
@@ -245,13 +245,13 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
245 | 245 | ||
246 | public bool isBannedFromLand(LLUUID avatar) | 246 | public bool isBannedFromLand(LLUUID avatar) |
247 | { | 247 | { |
248 | if ((landData.landFlags & (uint) Parcel.ParcelFlags.UseBanList) > 0) | 248 | if ((landData.Flags & (uint) Parcel.ParcelFlags.UseBanList) > 0) |
249 | { | 249 | { |
250 | ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); | 250 | ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); |
251 | entry.AgentID = avatar; | 251 | entry.AgentID = avatar; |
252 | entry.Flags = ParcelManager.AccessList.Ban; | 252 | entry.Flags = ParcelManager.AccessList.Ban; |
253 | entry.Time = new DateTime(); | 253 | entry.Time = new DateTime(); |
254 | if (landData.parcelAccessList.Contains(entry)) | 254 | if (landData.ParcelAccessList.Contains(entry)) |
255 | { | 255 | { |
256 | //They are banned, so lets send them a notice about this parcel | 256 | //They are banned, so lets send them a notice about this parcel |
257 | return true; | 257 | return true; |
@@ -262,13 +262,13 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
262 | 262 | ||
263 | public bool isRestrictedFromLand(LLUUID avatar) | 263 | public bool isRestrictedFromLand(LLUUID avatar) |
264 | { | 264 | { |
265 | if ((landData.landFlags & (uint) Parcel.ParcelFlags.UseAccessList) > 0) | 265 | if ((landData.Flags & (uint) Parcel.ParcelFlags.UseAccessList) > 0) |
266 | { | 266 | { |
267 | ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); | 267 | ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); |
268 | entry.AgentID = avatar; | 268 | entry.AgentID = avatar; |
269 | entry.Flags = ParcelManager.AccessList.Access; | 269 | entry.Flags = ParcelManager.AccessList.Access; |
270 | entry.Time = new DateTime(); | 270 | entry.Time = new DateTime(); |
271 | if (!landData.parcelAccessList.Contains(entry)) | 271 | if (!landData.ParcelAccessList.Contains(entry)) |
272 | { | 272 | { |
273 | //They are not allowed in this parcel, but not banned, so lets send them a notice about this parcel | 273 | //They are not allowed in this parcel, but not banned, so lets send them a notice about this parcel |
274 | return true; | 274 | return true; |
@@ -302,9 +302,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
302 | 302 | ||
303 | if (over != null) | 303 | if (over != null) |
304 | { | 304 | { |
305 | if (over.landData.localID == landData.localID) | 305 | if (over.landData.LocalID == landData.LocalID) |
306 | { | 306 | { |
307 | if (((over.landData.landFlags & (uint)Parcel.ParcelFlags.AllowDamage) != 0) && m_scene.RegionInfo.RegionSettings.AllowDamage) | 307 | if (((over.landData.Flags & (uint)Parcel.ParcelFlags.AllowDamage) != 0) && m_scene.RegionInfo.RegionSettings.AllowDamage) |
308 | avatars[i].Invulnerable = false; | 308 | avatars[i].Invulnerable = false; |
309 | else | 309 | else |
310 | avatars[i].Invulnerable = true; | 310 | avatars[i].Invulnerable = true; |
@@ -322,7 +322,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
322 | public List<LLUUID> createAccessListArrayByFlag(ParcelManager.AccessList flag) | 322 | public List<LLUUID> createAccessListArrayByFlag(ParcelManager.AccessList flag) |
323 | { | 323 | { |
324 | List<LLUUID> list = new List<LLUUID>(); | 324 | List<LLUUID> list = new List<LLUUID>(); |
325 | foreach (ParcelManager.ParcelAccessEntry entry in landData.parcelAccessList) | 325 | foreach (ParcelManager.ParcelAccessEntry entry in landData.ParcelAccessList) |
326 | { | 326 | { |
327 | if (entry.Flags == flag) | 327 | if (entry.Flags == flag) |
328 | { | 328 | { |
@@ -344,13 +344,13 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
344 | if (flags == (uint) ParcelManager.AccessList.Access || flags == (uint) ParcelManager.AccessList.Both) | 344 | if (flags == (uint) ParcelManager.AccessList.Access || flags == (uint) ParcelManager.AccessList.Both) |
345 | { | 345 | { |
346 | List<LLUUID> avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Access); | 346 | List<LLUUID> avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Access); |
347 | remote_client.SendLandAccessListData(avatars,(uint) ParcelManager.AccessList.Access,landData.localID); | 347 | remote_client.SendLandAccessListData(avatars,(uint) ParcelManager.AccessList.Access,landData.LocalID); |
348 | } | 348 | } |
349 | 349 | ||
350 | if (flags == (uint) ParcelManager.AccessList.Ban || flags == (uint) ParcelManager.AccessList.Both) | 350 | if (flags == (uint) ParcelManager.AccessList.Ban || flags == (uint) ParcelManager.AccessList.Both) |
351 | { | 351 | { |
352 | List<LLUUID> avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Ban); | 352 | List<LLUUID> avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Ban); |
353 | remote_client.SendLandAccessListData(avatars, (uint)ParcelManager.AccessList.Ban, landData.localID); | 353 | remote_client.SendLandAccessListData(avatars, (uint)ParcelManager.AccessList.Ban, landData.LocalID); |
354 | } | 354 | } |
355 | } | 355 | } |
356 | 356 | ||
@@ -364,7 +364,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
364 | } | 364 | } |
365 | 365 | ||
366 | List<ParcelManager.ParcelAccessEntry> toRemove = new List<ParcelManager.ParcelAccessEntry>(); | 366 | List<ParcelManager.ParcelAccessEntry> toRemove = new List<ParcelManager.ParcelAccessEntry>(); |
367 | foreach (ParcelManager.ParcelAccessEntry entry in newData.parcelAccessList) | 367 | foreach (ParcelManager.ParcelAccessEntry entry in newData.ParcelAccessList) |
368 | { | 368 | { |
369 | if (entry.Flags == (ParcelManager.AccessList) flags) | 369 | if (entry.Flags == (ParcelManager.AccessList) flags) |
370 | { | 370 | { |
@@ -374,7 +374,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
374 | 374 | ||
375 | foreach (ParcelManager.ParcelAccessEntry entry in toRemove) | 375 | foreach (ParcelManager.ParcelAccessEntry entry in toRemove) |
376 | { | 376 | { |
377 | newData.parcelAccessList.Remove(entry); | 377 | newData.ParcelAccessList.Remove(entry); |
378 | } | 378 | } |
379 | foreach (ParcelManager.ParcelAccessEntry entry in entries) | 379 | foreach (ParcelManager.ParcelAccessEntry entry in entries) |
380 | { | 380 | { |
@@ -383,13 +383,13 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
383 | temp.Time = new DateTime(); //Pointless? Yes. | 383 | temp.Time = new DateTime(); //Pointless? Yes. |
384 | temp.Flags = (ParcelManager.AccessList) flags; | 384 | temp.Flags = (ParcelManager.AccessList) flags; |
385 | 385 | ||
386 | if (!newData.parcelAccessList.Contains(temp)) | 386 | if (!newData.ParcelAccessList.Contains(temp)) |
387 | { | 387 | { |
388 | newData.parcelAccessList.Add(temp); | 388 | newData.ParcelAccessList.Add(temp); |
389 | } | 389 | } |
390 | } | 390 | } |
391 | 391 | ||
392 | m_scene.LandChannel.UpdateLandObject(landData.localID, newData); | 392 | m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData); |
393 | } | 393 | } |
394 | 394 | ||
395 | #endregion | 395 | #endregion |
@@ -398,7 +398,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
398 | 398 | ||
399 | public void updateLandBitmapByteArray() | 399 | public void updateLandBitmapByteArray() |
400 | { | 400 | { |
401 | landData.landBitmapByteArray = convertLandBitmapToBytes(); | 401 | landData.Bitmap = convertLandBitmapToBytes(); |
402 | } | 402 | } |
403 | 403 | ||
404 | /// <summary> | 404 | /// <summary> |
@@ -459,7 +459,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
459 | landData.AABBMax = | 459 | landData.AABBMax = |
460 | new LLVector3((float) (max_x * 4), (float) (max_y * 4), | 460 | new LLVector3((float) (max_x * 4), (float) (max_y * 4), |
461 | (float) m_scene.Heightmap[tx, ty]); | 461 | (float) m_scene.Heightmap[tx, ty]); |
462 | landData.area = tempArea; | 462 | landData.Area = tempArea; |
463 | } | 463 | } |
464 | 464 | ||
465 | #endregion | 465 | #endregion |
@@ -622,7 +622,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
622 | int x = 0, y = 0, i = 0, bitNum = 0; | 622 | int x = 0, y = 0, i = 0, bitNum = 0; |
623 | for (i = 0; i < 512; i++) | 623 | for (i = 0; i < 512; i++) |
624 | { | 624 | { |
625 | tempByte = landData.landBitmapByteArray[i]; | 625 | tempByte = landData.Bitmap[i]; |
626 | for (bitNum = 0; bitNum < 8; bitNum++) | 626 | for (bitNum = 0; bitNum < 8; bitNum++) |
627 | { | 627 | { |
628 | bool bit = Convert.ToBoolean(Convert.ToByte(tempByte >> bitNum) & (byte) 1); | 628 | bool bit = Convert.ToBoolean(Convert.ToByte(tempByte >> bitNum) & (byte) 1); |
@@ -655,7 +655,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
655 | { | 655 | { |
656 | if (obj.LocalId > 0) | 656 | if (obj.LocalId > 0) |
657 | { | 657 | { |
658 | if (request_type == LandChannel.LAND_SELECT_OBJECTS_OWNER && obj.OwnerID == landData.ownerID) | 658 | if (request_type == LandChannel.LAND_SELECT_OBJECTS_OWNER && obj.OwnerID == landData.OwnerID) |
659 | { | 659 | { |
660 | resultLocalIDs.Add(obj.LocalId); | 660 | resultLocalIDs.Add(obj.LocalId); |
661 | } | 661 | } |
@@ -798,10 +798,10 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
798 | 798 | ||
799 | public void resetLandPrimCounts() | 799 | public void resetLandPrimCounts() |
800 | { | 800 | { |
801 | landData.groupPrims = 0; | 801 | landData.GroupPrims = 0; |
802 | landData.ownerPrims = 0; | 802 | landData.OwnerPrims = 0; |
803 | landData.otherPrims = 0; | 803 | landData.OtherPrims = 0; |
804 | landData.selectedPrims = 0; | 804 | landData.SelectedPrims = 0; |
805 | 805 | ||
806 | 806 | ||
807 | lock (primsOverMe) | 807 | lock (primsOverMe) |
@@ -816,17 +816,17 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
816 | 816 | ||
817 | if (obj.IsSelected) | 817 | if (obj.IsSelected) |
818 | { | 818 | { |
819 | landData.selectedPrims += prim_count; | 819 | landData.SelectedPrims += prim_count; |
820 | } | 820 | } |
821 | else | 821 | else |
822 | { | 822 | { |
823 | if (prim_owner == landData.ownerID) | 823 | if (prim_owner == landData.OwnerID) |
824 | { | 824 | { |
825 | landData.ownerPrims += prim_count; | 825 | landData.OwnerPrims += prim_count; |
826 | } | 826 | } |
827 | else | 827 | else |
828 | { | 828 | { |
829 | landData.otherPrims += prim_count; | 829 | landData.OtherPrims += prim_count; |
830 | } | 830 | } |
831 | } | 831 | } |
832 | 832 | ||
@@ -843,17 +843,17 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
843 | LLUUID prim_owner = obj.OwnerID; | 843 | LLUUID prim_owner = obj.OwnerID; |
844 | int prim_count = obj.PrimCount; | 844 | int prim_count = obj.PrimCount; |
845 | 845 | ||
846 | if (prim_owner == landData.ownerID) | 846 | if (prim_owner == landData.OwnerID) |
847 | { | 847 | { |
848 | landData.ownerPrims -= prim_count; | 848 | landData.OwnerPrims -= prim_count; |
849 | } | 849 | } |
850 | else if (prim_owner == landData.groupID) | 850 | else if (prim_owner == landData.GroupID) |
851 | { | 851 | { |
852 | landData.groupPrims -= prim_count; | 852 | landData.GroupPrims -= prim_count; |
853 | } | 853 | } |
854 | else | 854 | else |
855 | { | 855 | { |
856 | landData.otherPrims -= prim_count; | 856 | landData.OtherPrims -= prim_count; |
857 | } | 857 | } |
858 | 858 | ||
859 | primsOverMe.Remove(obj); | 859 | primsOverMe.Remove(obj); |