diff options
author | Melanie Thielker | 2010-07-14 03:59:26 +0200 |
---|---|---|
committer | Melanie | 2010-07-14 03:51:00 +0100 |
commit | cd8bb316ea1bd0fc039c63ad75500a3b9c2d4248 (patch) | |
tree | 096fe80455443a31cb546c29f076287d2fab8b6a /OpenSim/Region | |
parent | Revamp the permissions propagation. This MAY mess up. Please test. (diff) | |
download | opensim-SC-cd8bb316ea1bd0fc039c63ad75500a3b9c2d4248.zip opensim-SC-cd8bb316ea1bd0fc039c63ad75500a3b9c2d4248.tar.gz opensim-SC-cd8bb316ea1bd0fc039c63ad75500a3b9c2d4248.tar.bz2 opensim-SC-cd8bb316ea1bd0fc039c63ad75500a3b9c2d4248.tar.xz |
Remove getting the object capacity from the money module. It is now set
directly from the Region Info (and the region ini file)
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandObject.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 18 | ||||
-rw-r--r-- | OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs | 7 |
3 files changed, 6 insertions, 23 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 3945142..2a87da2 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs | |||
@@ -146,7 +146,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
146 | else | 146 | else |
147 | { | 147 | { |
148 | // Normal Calculations | 148 | // Normal Calculations |
149 | return (int)Math.Round(((float)LandData.Area / 65536.0f) * (float)m_scene.objectCapacity * (float)m_scene.RegionInfo.RegionSettings.ObjectBonus); | 149 | return (int)Math.Round(((float)LandData.Area / 65536.0f) * (float)m_scene.RegionInfo.ObjectCapacity * (float)m_scene.RegionInfo.RegionSettings.ObjectBonus); |
150 | } | 150 | } |
151 | } | 151 | } |
152 | public int GetSimulatorMaxPrimCount(ILandObject thisObject) | 152 | public int GetSimulatorMaxPrimCount(ILandObject thisObject) |
@@ -158,7 +158,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
158 | else | 158 | else |
159 | { | 159 | { |
160 | //Normal Calculations | 160 | //Normal Calculations |
161 | return m_scene.objectCapacity; | 161 | return m_scene.RegionInfo.ObjectCapacity; |
162 | } | 162 | } |
163 | } | 163 | } |
164 | #endregion | 164 | #endregion |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index f7d2d37..40176ec 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -478,8 +478,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
478 | set { m_sceneGraph.RestorePresences = value; } | 478 | set { m_sceneGraph.RestorePresences = value; } |
479 | } | 479 | } |
480 | 480 | ||
481 | public int objectCapacity = 45000; | ||
482 | |||
483 | #endregion | 481 | #endregion |
484 | 482 | ||
485 | #region BinaryStats | 483 | #region BinaryStats |
@@ -687,7 +685,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
687 | StatsReporter.OnSendStatsResult += SendSimStatsPackets; | 685 | StatsReporter.OnSendStatsResult += SendSimStatsPackets; |
688 | StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats; | 686 | StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats; |
689 | 687 | ||
690 | StatsReporter.SetObjectCapacity(objectCapacity); | 688 | StatsReporter.SetObjectCapacity(RegionInfo.ObjectCapacity); |
691 | 689 | ||
692 | // Old | 690 | // Old |
693 | /* | 691 | /* |
@@ -4119,20 +4117,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
4119 | 4117 | ||
4120 | #region Other Methods | 4118 | #region Other Methods |
4121 | 4119 | ||
4122 | public void SetObjectCapacity(int objects) | ||
4123 | { | ||
4124 | // Region specific config overrides global | ||
4125 | // | ||
4126 | if (RegionInfo.ObjectCapacity != 0) | ||
4127 | objects = RegionInfo.ObjectCapacity; | ||
4128 | |||
4129 | if (StatsReporter != null) | ||
4130 | { | ||
4131 | StatsReporter.SetObjectCapacity(objects); | ||
4132 | } | ||
4133 | objectCapacity = objects; | ||
4134 | } | ||
4135 | |||
4136 | #endregion | 4120 | #endregion |
4137 | 4121 | ||
4138 | public void HandleObjectPermissionsUpdate(IClientAPI controller, UUID agentID, UUID sessionID, byte field, uint localId, uint mask, byte set) | 4122 | public void HandleObjectPermissionsUpdate(IClientAPI controller, UUID agentID, UUID sessionID, byte field, uint localId, uint mask, byte set) |
diff --git a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs index 6f5ef9e..653f856 100644 --- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs +++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs | |||
@@ -138,8 +138,6 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
138 | public void AddRegion(Scene scene) | 138 | public void AddRegion(Scene scene) |
139 | { | 139 | { |
140 | // Send ObjectCapacity to Scene.. Which sends it to the SimStatsReporter. | 140 | // Send ObjectCapacity to Scene.. Which sends it to the SimStatsReporter. |
141 | scene.SetObjectCapacity(ObjectCapacity); | ||
142 | |||
143 | if (m_enabled) | 141 | if (m_enabled) |
144 | { | 142 | { |
145 | scene.RegisterModuleInterface<IMoneyModule>(this); | 143 | scene.RegisterModuleInterface<IMoneyModule>(this); |
@@ -252,7 +250,6 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
252 | 250 | ||
253 | if (config == "Economy" && startupConfig != null) | 251 | if (config == "Economy" && startupConfig != null) |
254 | { | 252 | { |
255 | ObjectCapacity = startupConfig.GetInt("ObjectCapacity", 45000); | ||
256 | PriceEnergyUnit = startupConfig.GetInt("PriceEnergyUnit", 100); | 253 | PriceEnergyUnit = startupConfig.GetInt("PriceEnergyUnit", 100); |
257 | PriceObjectClaim = startupConfig.GetInt("PriceObjectClaim", 10); | 254 | PriceObjectClaim = startupConfig.GetInt("PriceObjectClaim", 10); |
258 | PricePublicObjectDecay = startupConfig.GetInt("PricePublicObjectDecay", 4); | 255 | PricePublicObjectDecay = startupConfig.GetInt("PricePublicObjectDecay", 4); |
@@ -701,7 +698,9 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
701 | 698 | ||
702 | if (user != null) | 699 | if (user != null) |
703 | { | 700 | { |
704 | user.SendEconomyData(EnergyEfficiency, ObjectCapacity, ObjectCount, PriceEnergyUnit, PriceGroupCreate, | 701 | Scene s = LocateSceneClientIn(user.AgentId); |
702 | |||
703 | user.SendEconomyData(EnergyEfficiency, s.RegionInfo.ObjectCapacity, ObjectCount, PriceEnergyUnit, PriceGroupCreate, | ||
705 | PriceObjectClaim, PriceObjectRent, PriceObjectScaleFactor, PriceParcelClaim, PriceParcelClaimFactor, | 704 | PriceObjectClaim, PriceObjectRent, PriceObjectScaleFactor, PriceParcelClaim, PriceParcelClaimFactor, |
706 | PriceParcelRent, PricePublicObjectDecay, PricePublicObjectDelete, PriceRentLight, PriceUpload, | 705 | PriceParcelRent, PricePublicObjectDecay, PricePublicObjectDelete, PriceRentLight, PriceUpload, |
707 | TeleportMinPrice, TeleportPriceExponent); | 706 | TeleportMinPrice, TeleportPriceExponent); |