aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
diff options
context:
space:
mode:
authorUbitUmarov2012-09-19 01:33:16 +0100
committerUbitUmarov2012-09-19 01:33:16 +0100
commitfb32604b413052ddedccba36247e676427c48824 (patch)
tree60533b21ae0b669041288a37482e906e3ac9f80a /OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
parent coment out mesh model upload code to add textures and individual meshs (diff)
downloadopensim-SC-fb32604b413052ddedccba36247e676427c48824.zip
opensim-SC-fb32604b413052ddedccba36247e676427c48824.tar.gz
opensim-SC-fb32604b413052ddedccba36247e676427c48824.tar.bz2
opensim-SC-fb32604b413052ddedccba36247e676427c48824.tar.xz
create a single ModelCost provider for the caps instance. Let it know and
check scene prim size limits.
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);