aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs16
-rw-r--r--OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs12
-rw-r--r--OpenSim/Region/Environment/Modules/World/Land/LandObject.cs43
-rw-r--r--OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs2
4 files changed, 69 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs b/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs
index 0b77b23..b83de23 100644
--- a/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs
+++ b/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs
@@ -149,6 +149,22 @@ namespace OpenSim.Region.Environment.Modules.World.Land
149 m_landManagementModule.ReturnObjectsInParcel(localID, returnType, agentIDs, taskIDs, remoteClient); 149 m_landManagementModule.ReturnObjectsInParcel(localID, returnType, agentIDs, taskIDs, remoteClient);
150 } 150 }
151 } 151 }
152
153 public void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel)
154 {
155 if (m_landManagementModule != null)
156 {
157 m_landManagementModule.setParcelObjectMaxOverride(overrideDel);
158 }
159 }
160
161 public void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel)
162 {
163 if (m_landManagementModule != null)
164 {
165 m_landManagementModule.setSimulatorObjectMaxOverride(overrideDel);
166 }
167 }
152 #endregion 168 #endregion
153 169
154 } 170 }
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs
index 1c04796..984bc4e 100644
--- a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs
@@ -585,7 +585,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
585 ResetAllLandPrimCounts(); 585 ResetAllLandPrimCounts();
586 lock (m_scene.Entities) 586 lock (m_scene.Entities)
587 { 587 {
588 foreach (EntityBase obj in m_scene.Entities.Values) 588 foreach (EntityBase obj in m_scene.Entities.Values)
589 { 589 {
590 if (obj != null) 590 if (obj != null)
591 { 591 {
@@ -1048,6 +1048,16 @@ namespace OpenSim.Region.Environment.Modules.World.Land
1048 1048
1049 #endregion 1049 #endregion
1050 1050
1051 public void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel)
1052 {
1053 foreach (LandObject obj in landList.Values)
1054 {
1055 obj.setParcelObjectMaxOverride(overrideDel);
1056 }
1057 }
1058 public void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel)
1059 {
1060 }
1051 } 1061 }
1052 1062
1053} \ No newline at end of file 1063} \ No newline at end of file
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
index f5b1a1d..2ff48cc 100644
--- a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
+++ b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
@@ -116,13 +116,52 @@ namespace OpenSim.Region.Environment.Modules.World.Land
116 return newLand; 116 return newLand;
117 } 117 }
118 118
119 #endregion 119
120 static overrideParcelMaxPrimCountDelegate overrideParcelMaxPrimCount;
121 static overrideSimulatorMaxPrimCountDelegate overrideSimulatorMaxPrimCount;
122
123 public void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel)
124 {
125 overrideParcelMaxPrimCount = overrideDel;
126 }
127 public void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel)
128 {
129 overrideSimulatorMaxPrimCount = overrideDel;
130 }
120 131
132 public int getParcelMaxPrimCount(ILandObject thisObject)
133 {
134 if (overrideParcelMaxPrimCount != null)
135 {
136 return overrideParcelMaxPrimCount(thisObject);
137 }
138 else
139 {
140 //Normal Calculations
141 return Convert.ToInt32(
142 Math.Round((Convert.ToDecimal(landData.area) / Convert.ToDecimal(65536)) * m_scene.objectCapacity *
143 Convert.ToDecimal(m_scene.RegionInfo.EstateSettings.objectBonusFactor))); ;
144 }
145 }
146 public int getSimulatorMaxPrimCount(ILandObject thisObject)
147 {
148 if (overrideSimulatorMaxPrimCount != null)
149 {
150 return overrideSimulatorMaxPrimCount(thisObject);
151 }
152 else
153 {
154 //Normal Calculations
155 return m_scene.objectCapacity;
156 }
157 }
158 #endregion
159
121 #region Packet Request Handling 160 #region Packet Request Handling
122 161
123 public void sendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client) 162 public void sendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client)
124 { 163 {
125 remote_client.sendLandProperties(remote_client, sequence_id, snap_selection, request_result, landData, m_scene.RegionInfo.EstateSettings.objectBonusFactor, m_scene.objectCapacity,(uint) m_scene.RegionInfo.EstateSettings.regionFlags); 164 remote_client.sendLandProperties(remote_client, sequence_id, snap_selection, request_result, landData, m_scene.RegionInfo.EstateSettings.objectBonusFactor, getParcelMaxPrimCount(this), getSimulatorMaxPrimCount(this), (uint)m_scene.RegionInfo.EstateSettings.regionFlags);
126 } 165 }
127 166
128 public void updateLandProperties(LandUpdateArgs args, IClientAPI remote_client) 167 public void updateLandProperties(LandUpdateArgs args, IClientAPI remote_client)
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
index b8ca482..a64d857 100644
--- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
@@ -748,7 +748,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
748 { 748 {
749 } 749 }
750 750
751 public void sendLandProperties(IClientAPI remote_client, int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int simObjectCapacity, uint regionFlags) 751 public void sendLandProperties(IClientAPI remote_client, int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor,int parcelObjectCapacity, int simObjectCapacity, uint regionFlags)
752 { 752 {
753 } 753 }
754 public void sendLandAccessListData(List<LLUUID> avatars, uint accessFlag, int localLandID) 754 public void sendLandAccessListData(List<LLUUID> avatars, uint accessFlag, int localLandID)