Remove getting the object capacity from the money module. It is now set

directly from the Region Info (and the region ini file)
prebuild-update
Melanie Thielker 2010-07-14 03:59:26 +02:00 committed by Melanie
parent dd14016885
commit cd8bb316ea
3 changed files with 6 additions and 23 deletions

View File

@ -146,7 +146,7 @@ namespace OpenSim.Region.CoreModules.World.Land
else else
{ {
// Normal Calculations // Normal Calculations
return (int)Math.Round(((float)LandData.Area / 65536.0f) * (float)m_scene.objectCapacity * (float)m_scene.RegionInfo.RegionSettings.ObjectBonus); return (int)Math.Round(((float)LandData.Area / 65536.0f) * (float)m_scene.RegionInfo.ObjectCapacity * (float)m_scene.RegionInfo.RegionSettings.ObjectBonus);
} }
} }
public int GetSimulatorMaxPrimCount(ILandObject thisObject) public int GetSimulatorMaxPrimCount(ILandObject thisObject)
@ -158,7 +158,7 @@ namespace OpenSim.Region.CoreModules.World.Land
else else
{ {
//Normal Calculations //Normal Calculations
return m_scene.objectCapacity; return m_scene.RegionInfo.ObjectCapacity;
} }
} }
#endregion #endregion

View File

@ -478,8 +478,6 @@ namespace OpenSim.Region.Framework.Scenes
set { m_sceneGraph.RestorePresences = value; } set { m_sceneGraph.RestorePresences = value; }
} }
public int objectCapacity = 45000;
#endregion #endregion
#region BinaryStats #region BinaryStats
@ -687,7 +685,7 @@ namespace OpenSim.Region.Framework.Scenes
StatsReporter.OnSendStatsResult += SendSimStatsPackets; StatsReporter.OnSendStatsResult += SendSimStatsPackets;
StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats; StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats;
StatsReporter.SetObjectCapacity(objectCapacity); StatsReporter.SetObjectCapacity(RegionInfo.ObjectCapacity);
// Old // Old
/* /*
@ -4119,20 +4117,6 @@ namespace OpenSim.Region.Framework.Scenes
#region Other Methods #region Other Methods
public void SetObjectCapacity(int objects)
{
// Region specific config overrides global
//
if (RegionInfo.ObjectCapacity != 0)
objects = RegionInfo.ObjectCapacity;
if (StatsReporter != null)
{
StatsReporter.SetObjectCapacity(objects);
}
objectCapacity = objects;
}
#endregion #endregion
public void HandleObjectPermissionsUpdate(IClientAPI controller, UUID agentID, UUID sessionID, byte field, uint localId, uint mask, byte set) public void HandleObjectPermissionsUpdate(IClientAPI controller, UUID agentID, UUID sessionID, byte field, uint localId, uint mask, byte set)

View File

@ -138,8 +138,6 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
public void AddRegion(Scene scene) public void AddRegion(Scene scene)
{ {
// Send ObjectCapacity to Scene.. Which sends it to the SimStatsReporter. // Send ObjectCapacity to Scene.. Which sends it to the SimStatsReporter.
scene.SetObjectCapacity(ObjectCapacity);
if (m_enabled) if (m_enabled)
{ {
scene.RegisterModuleInterface<IMoneyModule>(this); scene.RegisterModuleInterface<IMoneyModule>(this);
@ -252,7 +250,6 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
if (config == "Economy" && startupConfig != null) if (config == "Economy" && startupConfig != null)
{ {
ObjectCapacity = startupConfig.GetInt("ObjectCapacity", 45000);
PriceEnergyUnit = startupConfig.GetInt("PriceEnergyUnit", 100); PriceEnergyUnit = startupConfig.GetInt("PriceEnergyUnit", 100);
PriceObjectClaim = startupConfig.GetInt("PriceObjectClaim", 10); PriceObjectClaim = startupConfig.GetInt("PriceObjectClaim", 10);
PricePublicObjectDecay = startupConfig.GetInt("PricePublicObjectDecay", 4); PricePublicObjectDecay = startupConfig.GetInt("PricePublicObjectDecay", 4);
@ -701,7 +698,9 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
if (user != null) if (user != null)
{ {
user.SendEconomyData(EnergyEfficiency, ObjectCapacity, ObjectCount, PriceEnergyUnit, PriceGroupCreate, Scene s = LocateSceneClientIn(user.AgentId);
user.SendEconomyData(EnergyEfficiency, s.RegionInfo.ObjectCapacity, ObjectCount, PriceEnergyUnit, PriceGroupCreate,
PriceObjectClaim, PriceObjectRent, PriceObjectScaleFactor, PriceParcelClaim, PriceParcelClaimFactor, PriceObjectClaim, PriceObjectRent, PriceObjectScaleFactor, PriceParcelClaim, PriceParcelClaimFactor,
PriceParcelRent, PricePublicObjectDecay, PricePublicObjectDelete, PriceRentLight, PriceUpload, PriceParcelRent, PricePublicObjectDecay, PricePublicObjectDelete, PriceRentLight, PriceUpload,
TeleportMinPrice, TeleportPriceExponent); TeleportMinPrice, TeleportPriceExponent);