diff options
author | Teravus Ovares | 2008-09-06 07:52:41 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-09-06 07:52:41 +0000 |
commit | 7d89e122930be39e84a6d174548fa2d12ac0484a (patch) | |
tree | e5aa5752f988a9aba2a969f49e5e208985eda80c /OpenSim/Region/Environment/Modules/World/Land/LandObject.cs | |
parent | * minor: speculatively try a change to bamboo.build to see if this generates ... (diff) | |
download | opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.zip opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.gz opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.bz2 opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.xz |
* This is the fabled LibOMV update with all of the libOMV types from JHurliman
* This is a HUGE OMG update and will definitely have unknown side effects.. so this is really only for the strong hearted at this point. Regular people should let the dust settle.
* This has been tested to work with most basic functions. However.. make sure you back up 'everything' before using this. It's that big!
* Essentially we're back at square 1 in the testing phase.. so lets identify things that broke.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Land/LandObject.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Land/LandObject.cs | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs index 6388a1c..640b665 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Reflection; | 30 | using System.Reflection; |
31 | using libsecondlife; | 31 | using OpenMetaverse; |
32 | using log4net; | 32 | using log4net; |
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
34 | using OpenSim.Region.Environment.Interfaces; | 34 | using OpenSim.Region.Environment.Interfaces; |
@@ -67,14 +67,14 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
67 | set { m_landData = value; } | 67 | set { m_landData = value; } |
68 | } | 68 | } |
69 | 69 | ||
70 | public LLUUID regionUUID | 70 | public UUID regionUUID |
71 | { | 71 | { |
72 | get { return m_scene.RegionInfo.RegionID; } | 72 | get { return m_scene.RegionInfo.RegionID; } |
73 | } | 73 | } |
74 | 74 | ||
75 | #region Constructors | 75 | #region Constructors |
76 | 76 | ||
77 | public LandObject(LLUUID owner_id, bool is_group_owned, Scene scene) | 77 | public LandObject(UUID 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; |
@@ -216,7 +216,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
216 | } | 216 | } |
217 | } | 217 | } |
218 | 218 | ||
219 | public void updateLandSold(LLUUID avatarID, LLUUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area) | 219 | public void updateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area) |
220 | { | 220 | { |
221 | LandData newData = landData.Copy(); | 221 | LandData newData = landData.Copy(); |
222 | newData.OwnerID = avatarID; | 222 | newData.OwnerID = avatarID; |
@@ -226,14 +226,14 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
226 | newData.ClaimDate = Util.UnixTimeSinceEpoch(); | 226 | newData.ClaimDate = Util.UnixTimeSinceEpoch(); |
227 | newData.ClaimPrice = claimprice; | 227 | newData.ClaimPrice = claimprice; |
228 | newData.SalePrice = 0; | 228 | newData.SalePrice = 0; |
229 | newData.AuthBuyerID = LLUUID.Zero; | 229 | newData.AuthBuyerID = UUID.Zero; |
230 | newData.Flags &= ~(uint) (Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects); | 230 | newData.Flags &= ~(uint) (Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects); |
231 | m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData); | 231 | m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData); |
232 | 232 | ||
233 | sendLandUpdateToAvatarsOverMe(); | 233 | sendLandUpdateToAvatarsOverMe(); |
234 | } | 234 | } |
235 | 235 | ||
236 | public bool isEitherBannedOrRestricted(LLUUID avatar) | 236 | public bool isEitherBannedOrRestricted(UUID avatar) |
237 | { | 237 | { |
238 | if (isBannedFromLand(avatar)) | 238 | if (isBannedFromLand(avatar)) |
239 | { | 239 | { |
@@ -246,7 +246,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
246 | return false; | 246 | return false; |
247 | } | 247 | } |
248 | 248 | ||
249 | public bool isBannedFromLand(LLUUID avatar) | 249 | public bool isBannedFromLand(UUID avatar) |
250 | { | 250 | { |
251 | if ((landData.Flags & (uint) Parcel.ParcelFlags.UseBanList) > 0) | 251 | if ((landData.Flags & (uint) Parcel.ParcelFlags.UseBanList) > 0) |
252 | { | 252 | { |
@@ -263,7 +263,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
263 | return false; | 263 | return false; |
264 | } | 264 | } |
265 | 265 | ||
266 | public bool isRestrictedFromLand(LLUUID avatar) | 266 | public bool isRestrictedFromLand(UUID avatar) |
267 | { | 267 | { |
268 | if ((landData.Flags & (uint) Parcel.ParcelFlags.UseAccessList) > 0) | 268 | if ((landData.Flags & (uint) Parcel.ParcelFlags.UseAccessList) > 0) |
269 | { | 269 | { |
@@ -322,9 +322,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
322 | 322 | ||
323 | #region AccessList Functions | 323 | #region AccessList Functions |
324 | 324 | ||
325 | public List<LLUUID> createAccessListArrayByFlag(ParcelManager.AccessList flag) | 325 | public List<UUID> createAccessListArrayByFlag(ParcelManager.AccessList flag) |
326 | { | 326 | { |
327 | List<LLUUID> list = new List<LLUUID>(); | 327 | List<UUID> list = new List<UUID>(); |
328 | foreach (ParcelManager.ParcelAccessEntry entry in landData.ParcelAccessList) | 328 | foreach (ParcelManager.ParcelAccessEntry entry in landData.ParcelAccessList) |
329 | { | 329 | { |
330 | if (entry.Flags == flag) | 330 | if (entry.Flags == flag) |
@@ -334,25 +334,25 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
334 | } | 334 | } |
335 | if (list.Count == 0) | 335 | if (list.Count == 0) |
336 | { | 336 | { |
337 | list.Add(LLUUID.Zero); | 337 | list.Add(UUID.Zero); |
338 | } | 338 | } |
339 | 339 | ||
340 | return list; | 340 | return list; |
341 | } | 341 | } |
342 | 342 | ||
343 | public void sendAccessList(LLUUID agentID, LLUUID sessionID, uint flags, int sequenceID, | 343 | public void sendAccessList(UUID agentID, UUID sessionID, uint flags, int sequenceID, |
344 | IClientAPI remote_client) | 344 | IClientAPI remote_client) |
345 | { | 345 | { |
346 | 346 | ||
347 | if (flags == (uint) ParcelManager.AccessList.Access || flags == (uint) ParcelManager.AccessList.Both) | 347 | if (flags == (uint) ParcelManager.AccessList.Access || flags == (uint) ParcelManager.AccessList.Both) |
348 | { | 348 | { |
349 | List<LLUUID> avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Access); | 349 | List<UUID> avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Access); |
350 | remote_client.SendLandAccessListData(avatars,(uint) ParcelManager.AccessList.Access,landData.LocalID); | 350 | remote_client.SendLandAccessListData(avatars,(uint) ParcelManager.AccessList.Access,landData.LocalID); |
351 | } | 351 | } |
352 | 352 | ||
353 | if (flags == (uint) ParcelManager.AccessList.Ban || flags == (uint) ParcelManager.AccessList.Both) | 353 | if (flags == (uint) ParcelManager.AccessList.Ban || flags == (uint) ParcelManager.AccessList.Both) |
354 | { | 354 | { |
355 | List<LLUUID> avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Ban); | 355 | List<UUID> avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Ban); |
356 | remote_client.SendLandAccessListData(avatars, (uint)ParcelManager.AccessList.Ban, landData.LocalID); | 356 | remote_client.SendLandAccessListData(avatars, (uint)ParcelManager.AccessList.Ban, landData.LocalID); |
357 | } | 357 | } |
358 | } | 358 | } |
@@ -361,7 +361,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
361 | { | 361 | { |
362 | LandData newData = landData.Copy(); | 362 | LandData newData = landData.Copy(); |
363 | 363 | ||
364 | if (entries.Count == 1 && entries[0].AgentID == LLUUID.Zero) | 364 | if (entries.Count == 1 && entries[0].AgentID == UUID.Zero) |
365 | { | 365 | { |
366 | entries.Clear(); | 366 | entries.Clear(); |
367 | } | 367 | } |
@@ -450,7 +450,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
450 | if (ty > 255) | 450 | if (ty > 255) |
451 | ty = 255; | 451 | ty = 255; |
452 | landData.AABBMin = | 452 | landData.AABBMin = |
453 | new LLVector3((float) (min_x * 4), (float) (min_y * 4), | 453 | new Vector3((float) (min_x * 4), (float) (min_y * 4), |
454 | (float) m_scene.Heightmap[tx, ty]); | 454 | (float) m_scene.Heightmap[tx, ty]); |
455 | 455 | ||
456 | tx = max_x * 4; | 456 | tx = max_x * 4; |
@@ -460,7 +460,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
460 | if (ty > 255) | 460 | if (ty > 255) |
461 | ty = 255; | 461 | ty = 255; |
462 | landData.AABBMax = | 462 | landData.AABBMax = |
463 | new LLVector3((float) (max_x * 4), (float) (max_y * 4), | 463 | new Vector3((float) (max_x * 4), (float) (max_y * 4), |
464 | (float) m_scene.Heightmap[tx, ty]); | 464 | (float) m_scene.Heightmap[tx, ty]); |
465 | landData.Area = tempArea; | 465 | landData.Area = tempArea; |
466 | } | 466 | } |
@@ -694,7 +694,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
694 | { | 694 | { |
695 | if (m_scene.ExternalChecks.ExternalChecksCanEditParcel(remote_client.AgentId, this)) | 695 | if (m_scene.ExternalChecks.ExternalChecksCanEditParcel(remote_client.AgentId, this)) |
696 | { | 696 | { |
697 | Dictionary<LLUUID, int> primCount = new Dictionary<LLUUID, int>(); | 697 | Dictionary<UUID, int> primCount = new Dictionary<UUID, int>(); |
698 | 698 | ||
699 | lock (primsOverMe) | 699 | lock (primsOverMe) |
700 | { | 700 | { |
@@ -734,9 +734,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
734 | } | 734 | } |
735 | } | 735 | } |
736 | 736 | ||
737 | public Dictionary<LLUUID, int> getLandObjectOwners() | 737 | public Dictionary<UUID, int> getLandObjectOwners() |
738 | { | 738 | { |
739 | Dictionary<LLUUID, int> ownersAndCount = new Dictionary<LLUUID, int>(); | 739 | Dictionary<UUID, int> ownersAndCount = new Dictionary<UUID, int>(); |
740 | lock (primsOverMe) | 740 | lock (primsOverMe) |
741 | { | 741 | { |
742 | try | 742 | try |
@@ -771,7 +771,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
771 | m_scene.returnObjects(objs, obj.OwnerID); | 771 | m_scene.returnObjects(objs, obj.OwnerID); |
772 | } | 772 | } |
773 | 773 | ||
774 | public void returnLandObjects(uint type, LLUUID[] owners, IClientAPI remote_client) | 774 | public void returnLandObjects(uint type, UUID[] owners, IClientAPI remote_client) |
775 | { | 775 | { |
776 | List<SceneObjectGroup> objlist = new List<SceneObjectGroup>(); | 776 | List<SceneObjectGroup> objlist = new List<SceneObjectGroup>(); |
777 | for (int i = 0; i < owners.Length; i++) | 777 | for (int i = 0; i < owners.Length; i++) |
@@ -814,7 +814,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
814 | public void addPrimToCount(SceneObjectGroup obj) | 814 | public void addPrimToCount(SceneObjectGroup obj) |
815 | { | 815 | { |
816 | 816 | ||
817 | LLUUID prim_owner = obj.OwnerID; | 817 | UUID prim_owner = obj.OwnerID; |
818 | int prim_count = obj.PrimCount; | 818 | int prim_count = obj.PrimCount; |
819 | 819 | ||
820 | if (obj.IsSelected) | 820 | if (obj.IsSelected) |
@@ -843,7 +843,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
843 | { | 843 | { |
844 | if (primsOverMe.Contains(obj)) | 844 | if (primsOverMe.Contains(obj)) |
845 | { | 845 | { |
846 | LLUUID prim_owner = obj.OwnerID; | 846 | UUID prim_owner = obj.OwnerID; |
847 | int prim_count = obj.PrimCount; | 847 | int prim_count = obj.PrimCount; |
848 | 848 | ||
849 | if (prim_owner == landData.OwnerID) | 849 | if (prim_owner == landData.OwnerID) |