diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs index 29bde6c..fb22694 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs | |||
@@ -45,6 +45,8 @@ using ComponentAce.Compression.Libs.zlib; | |||
45 | using OSDArray = OpenMetaverse.StructuredData.OSDArray; | 45 | using OSDArray = OpenMetaverse.StructuredData.OSDArray; |
46 | using OSDMap = OpenMetaverse.StructuredData.OSDMap; | 46 | using OSDMap = OpenMetaverse.StructuredData.OSDMap; |
47 | 47 | ||
48 | using Nini.Config; | ||
49 | |||
48 | namespace OpenSim.Region.ClientStack.Linden | 50 | namespace OpenSim.Region.ClientStack.Linden |
49 | { | 51 | { |
50 | public struct ModelPrimLimits | 52 | public struct ModelPrimLimits |
@@ -100,6 +102,25 @@ namespace OpenSim.Region.ClientStack.Linden | |||
100 | public float PhysicalPrimScaleMax = 10f; | 102 | public float PhysicalPrimScaleMax = 10f; |
101 | public int ObjectLinkedPartsMax = 512; | 103 | public int ObjectLinkedPartsMax = 512; |
102 | 104 | ||
105 | |||
106 | public ModelCost(Scene scene) | ||
107 | { | ||
108 | PrimScaleMin = scene.m_minNonphys; | ||
109 | NonPhysicalPrimScaleMax = scene.m_maxNonphys; | ||
110 | PhysicalPrimScaleMax = scene.m_maxPhys; | ||
111 | ObjectLinkedPartsMax = scene.m_linksetCapacity; | ||
112 | } | ||
113 | |||
114 | public void Econfig(IConfig EconomyConfig) | ||
115 | { | ||
116 | ModelMeshCostFactor = EconomyConfig.GetFloat("MeshModelUploadCostFactor", ModelMeshCostFactor); | ||
117 | ModelTextureCostFactor = EconomyConfig.GetFloat("MeshModelUploadTextureCostFactor", ModelTextureCostFactor); | ||
118 | ModelMinCostFactor = EconomyConfig.GetFloat("MeshModelMinCostFactor", ModelMinCostFactor); | ||
119 | // next 2 are normalized so final cost is afected by modelUploadFactor above and normal cost | ||
120 | primCreationCost = EconomyConfig.GetFloat("ModelPrimCreationCost", primCreationCost); | ||
121 | bytecost = EconomyConfig.GetFloat("ModelMeshByteCost", bytecost); | ||
122 | } | ||
123 | |||
103 | // storage for a single mesh asset cost parameters | 124 | // storage for a single mesh asset cost parameters |
104 | private class ameshCostParam | 125 | private class ameshCostParam |
105 | { | 126 | { |