aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs14
1 files changed, 11 insertions, 3 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index 073f175..0fb6c99 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -87,6 +87,7 @@ namespace OpenSim.Region.ClientStack.Linden
87 87
88 private Scene m_Scene; 88 private Scene m_Scene;
89 private Caps m_HostCapsObj; 89 private Caps m_HostCapsObj;
90 private ModelCost m_ModelCost;
90 91
91 private static readonly string m_requestPath = "0000/"; 92 private static readonly string m_requestPath = "0000/";
92 // private static readonly string m_mapLayerPath = "0001/"; 93 // private static readonly string m_mapLayerPath = "0001/";
@@ -123,6 +124,15 @@ namespace OpenSim.Region.ClientStack.Linden
123 { 124 {
124 m_Scene = scene; 125 m_Scene = scene;
125 m_HostCapsObj = caps; 126 m_HostCapsObj = caps;
127
128 // create a model upload cost provider
129 m_ModelCost = new ModelCost();
130 // tell it about scene object limits
131 m_ModelCost.NonPhysicalPrimScaleMax = m_Scene.m_maxNonphys;
132 m_ModelCost.PhysicalPrimScaleMax = m_Scene.m_maxPhys;
133// m_ModelCost.PrimScaleMin = ??
134// m_ModelCost.ObjectLinkedPartsMax = ??
135
126 IConfigSource config = m_Scene.Config; 136 IConfigSource config = m_Scene.Config;
127 if (config != null) 137 if (config != null)
128 { 138 {
@@ -193,7 +203,6 @@ namespace OpenSim.Region.ClientStack.Linden
193 { 203 {
194 try 204 try
195 { 205 {
196 // I don't think this one works...
197 m_HostCapsObj.RegisterHandler( 206 m_HostCapsObj.RegisterHandler(
198 "NewFileAgentInventory", 207 "NewFileAgentInventory",
199 new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDAssetUploadResponse>( 208 new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDAssetUploadResponse>(
@@ -472,9 +481,8 @@ namespace OpenSim.Region.ClientStack.Linden
472 { 481 {
473 string error; 482 string error;
474 int modelcost; 483 int modelcost;
475 ModelCost mc = new ModelCost();
476 484
477 if (!mc.MeshModelCost(llsdRequest.asset_resources, baseCost, out modelcost, 485 if (!m_ModelCost.MeshModelCost(llsdRequest.asset_resources, baseCost, out modelcost,
478 meshcostdata, out error)) 486 meshcostdata, out error))
479 { 487 {
480 client.SendAgentAlertMessage(error, false); 488 client.SendAgentAlertMessage(error, false);