From d451dddcd0e061cd5aa326cb08d6e24e08817dcc Mon Sep 17 00:00:00 2001 From: MW Date: Thu, 9 Aug 2007 17:54:22 +0000 Subject: Start of replacing the old SceneObject/Primitive classes with the new versions. PLEASE NOTE: that with this revision some prim related features may be broke for a while. (things like linking prims and the parcel prim count.) Also this revision may not work on mono, but that will be fixed soon. --- OpenSim/Region/Environment/LandManagement/Land.cs | 38 +++++++++++----------- .../Environment/LandManagement/LandManager.cs | 4 +-- 2 files changed, 21 insertions(+), 21 deletions(-) (limited to 'OpenSim/Region/Environment/LandManagement') diff --git a/OpenSim/Region/Environment/LandManagement/Land.cs b/OpenSim/Region/Environment/LandManagement/Land.cs index 97f8276..e9f5248 100644 --- a/OpenSim/Region/Environment/LandManagement/Land.cs +++ b/OpenSim/Region/Environment/LandManagement/Land.cs @@ -16,7 +16,7 @@ namespace OpenSim.Region.Environment.LandManagement { #region Member Variables public LandData landData = new LandData(); - public List primsOverMe = new List(); + public List primsOverMe = new List(); public Scene m_scene; @@ -426,21 +426,21 @@ namespace OpenSim.Region.Environment.LandManagement public void sendForceObjectSelect(int local_id, int request_type, IClientAPI remote_client) { List resultLocalIDs = new List(); - foreach (SceneObject obj in primsOverMe) + foreach (SceneObjectGroup obj in primsOverMe) { - if (obj.rootLocalID > 0) + if (obj.LocalId > 0) { - if (request_type == LandManager.LAND_SELECT_OBJECTS_OWNER && obj.rootPrimitive.OwnerID == this.landData.ownerID) + if (request_type == LandManager.LAND_SELECT_OBJECTS_OWNER && obj.OwnerID == this.landData.ownerID) { - resultLocalIDs.Add(obj.rootLocalID); + resultLocalIDs.Add(obj.LocalId); } else if (request_type == LandManager.LAND_SELECT_OBJECTS_GROUP && false) //TODO: change false to group support! { } - else if (request_type == LandManager.LAND_SELECT_OBJECTS_OTHER && obj.rootPrimitive.OwnerID != remote_client.AgentId) + else if (request_type == LandManager.LAND_SELECT_OBJECTS_OTHER && obj.OwnerID != remote_client.AgentId) { - resultLocalIDs.Add(obj.rootLocalID); + resultLocalIDs.Add(obj.LocalId); } } } @@ -486,13 +486,13 @@ namespace OpenSim.Region.Environment.LandManagement public void sendLandObjectOwners(IClientAPI remote_client) { Dictionary ownersAndCount = new Dictionary(); - foreach (SceneObject obj in primsOverMe) + foreach (SceneObjectGroup obj in primsOverMe) { - if (!ownersAndCount.ContainsKey(obj.rootPrimitive.OwnerID)) + if (!ownersAndCount.ContainsKey(obj.OwnerID)) { - ownersAndCount.Add(obj.rootPrimitive.OwnerID, 0); + ownersAndCount.Add(obj.OwnerID, 0); } - ownersAndCount[obj.rootPrimitive.OwnerID] += obj.primCount; + ownersAndCount[obj.OwnerID] += obj.PrimCount; } if (ownersAndCount.Count > 0) { @@ -525,7 +525,7 @@ namespace OpenSim.Region.Environment.LandManagement #endregion #region Object Returning - public void returnObject(SceneObject obj) + public void returnObject(SceneObjectGroup obj) { } public void returnLandObjects(int type, LLUUID owner) @@ -544,12 +544,12 @@ namespace OpenSim.Region.Environment.LandManagement primsOverMe.Clear(); } - public void addPrimToCount(SceneObject obj) + public void addPrimToCount(SceneObjectGroup obj) { - LLUUID prim_owner = obj.rootPrimitive.OwnerID; - int prim_count = obj.primCount; + LLUUID prim_owner = obj.OwnerID; + int prim_count = obj.PrimCount; - if (obj.isSelected) + if (obj.IsSelected) { landData.selectedPrims += prim_count; } @@ -569,12 +569,12 @@ namespace OpenSim.Region.Environment.LandManagement } - public void removePrimFromCount(SceneObject obj) + public void removePrimFromCount(SceneObjectGroup obj) { if (primsOverMe.Contains(obj)) { - LLUUID prim_owner = obj.rootPrimitive.OwnerID; - int prim_count = obj.primCount; + LLUUID prim_owner = obj.OwnerID; + int prim_count = obj.PrimCount; if (prim_owner == landData.ownerID) { diff --git a/OpenSim/Region/Environment/LandManagement/LandManager.cs b/OpenSim/Region/Environment/LandManagement/LandManager.cs index f759934..f67b51a 100644 --- a/OpenSim/Region/Environment/LandManagement/LandManager.cs +++ b/OpenSim/Region/Environment/LandManagement/LandManager.cs @@ -552,7 +552,7 @@ namespace OpenSim.Region.Environment.LandManagement this.landPrimCountTainted = true; } - public void addPrimToLandPrimCounts(SceneObject obj) + public void addPrimToLandPrimCounts(SceneObjectGroup obj) { LLVector3 position = obj.Pos; Land landUnderPrim = getLandObject(position.X, position.Y); @@ -562,7 +562,7 @@ namespace OpenSim.Region.Environment.LandManagement } } - public void removePrimFromLandPrimCounts(SceneObject obj) + public void removePrimFromLandPrimCounts(SceneObjectGroup obj) { foreach (Land p in landList.Values) { -- cgit v1.1