diff options
Diffstat (limited to '')
3 files changed, 47 insertions, 47 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index 14a4873..8cb40e1 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | |||
@@ -97,7 +97,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
97 | private ModelCost m_ModelCost; | 97 | private ModelCost m_ModelCost; |
98 | 98 | ||
99 | // private static readonly string m_remoteParcelRequestPath = "0009/";// This is in the LandManagementModule. | 99 | // private static readonly string m_remoteParcelRequestPath = "0009/";// This is in the LandManagementModule. |
100 | 100 | ||
101 | // These are callbacks which will be setup by the scene so that we can update scene data when we | 101 | // These are callbacks which will be setup by the scene so that we can update scene data when we |
102 | // receive capability calls | 102 | // receive capability calls |
103 | public NewInventoryItem AddNewInventoryItem = null; | 103 | public NewInventoryItem AddNewInventoryItem = null; |
@@ -119,7 +119,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
119 | 119 | ||
120 | private bool m_enableModelUploadTextureToInventory = false; // place uploaded textures also in inventory | 120 | private bool m_enableModelUploadTextureToInventory = false; // place uploaded textures also in inventory |
121 | // may not be visible till relog | 121 | // may not be visible till relog |
122 | 122 | ||
123 | private bool m_RestrictFreeTestUploadPerms = false; // reduces also the permitions. Needs a creator defined!! | 123 | private bool m_RestrictFreeTestUploadPerms = false; // reduces also the permitions. Needs a creator defined!! |
124 | private UUID m_testAssetsCreatorID = UUID.Zero; | 124 | private UUID m_testAssetsCreatorID = UUID.Zero; |
125 | 125 | ||
@@ -138,7 +138,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
138 | processUpload = 3 | 138 | processUpload = 3 |
139 | } | 139 | } |
140 | private FileAgentInventoryState m_FileAgentInventoryState = FileAgentInventoryState.idle; | 140 | private FileAgentInventoryState m_FileAgentInventoryState = FileAgentInventoryState.idle; |
141 | 141 | ||
142 | public BunchOfCaps(Scene scene, UUID agentID, Caps caps) | 142 | public BunchOfCaps(Scene scene, UUID agentID, Caps caps) |
143 | { | 143 | { |
144 | m_Scene = scene; | 144 | m_Scene = scene; |
@@ -147,7 +147,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
147 | 147 | ||
148 | // create a model upload cost provider | 148 | // create a model upload cost provider |
149 | m_ModelCost = new ModelCost(scene); | 149 | m_ModelCost = new ModelCost(scene); |
150 | 150 | ||
151 | m_PrimScaleMin = m_ModelCost.PrimScaleMin; | 151 | m_PrimScaleMin = m_ModelCost.PrimScaleMin; |
152 | 152 | ||
153 | IConfigSource config = m_Scene.Config; | 153 | IConfigSource config = m_Scene.Config; |
@@ -216,7 +216,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
216 | 216 | ||
217 | public string GetNewCapPath() | 217 | public string GetNewCapPath() |
218 | { | 218 | { |
219 | return "/CAPS/" + UUID.Random(); | 219 | return "/CAPS/" + UUID.Random(); |
220 | } | 220 | } |
221 | 221 | ||
222 | /// <summary> | 222 | /// <summary> |
@@ -271,7 +271,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
271 | "POST", GetNewCapPath(), HomeLocation, "HomeLocation", null); | 271 | "POST", GetNewCapPath(), HomeLocation, "HomeLocation", null); |
272 | m_HostCapsObj.RegisterHandler("HomeLocation", HomeLocationHandler); | 272 | m_HostCapsObj.RegisterHandler("HomeLocation", HomeLocationHandler); |
273 | } | 273 | } |
274 | 274 | ||
275 | if(m_AllowCapGroupMemberData) | 275 | if(m_AllowCapGroupMemberData) |
276 | { | 276 | { |
277 | IRequestHandler GroupMemberDataHandler = new RestStreamHandler( | 277 | IRequestHandler GroupMemberDataHandler = new RestStreamHandler( |
@@ -314,7 +314,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
314 | IRequestHandler CopyInventoryFromNotecardHandler = new RestStreamHandler( | 314 | IRequestHandler CopyInventoryFromNotecardHandler = new RestStreamHandler( |
315 | "POST", GetNewCapPath(), CopyInventoryFromNotecard, "CopyInventoryFromNotecard", null); | 315 | "POST", GetNewCapPath(), CopyInventoryFromNotecard, "CopyInventoryFromNotecard", null); |
316 | m_HostCapsObj.RegisterHandler("CopyInventoryFromNotecard", CopyInventoryFromNotecardHandler); | 316 | m_HostCapsObj.RegisterHandler("CopyInventoryFromNotecard", CopyInventoryFromNotecardHandler); |
317 | 317 | ||
318 | } | 318 | } |
319 | catch (Exception e) | 319 | catch (Exception e) |
320 | { | 320 | { |
@@ -568,8 +568,8 @@ namespace OpenSim.Region.ClientStack.Linden | |||
568 | { | 568 | { |
569 | string error; | 569 | string error; |
570 | int modelcost; | 570 | int modelcost; |
571 | 571 | ||
572 | 572 | ||
573 | if (!m_ModelCost.MeshModelCost(llsdRequest.asset_resources, baseCost, out modelcost, | 573 | if (!m_ModelCost.MeshModelCost(llsdRequest.asset_resources, baseCost, out modelcost, |
574 | meshcostdata, out error, ref warning)) | 574 | meshcostdata, out error, ref warning)) |
575 | { | 575 | { |
@@ -639,7 +639,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
639 | client.SendAgentAlertMessage(warning, true); | 639 | client.SendAgentAlertMessage(warning, true); |
640 | } | 640 | } |
641 | } | 641 | } |
642 | 642 | ||
643 | string assetDes = llsdRequest.description; | 643 | string assetDes = llsdRequest.description; |
644 | UUID newAsset = UUID.Random(); | 644 | UUID newAsset = UUID.Random(); |
645 | UUID newInvItem = UUID.Random(); | 645 | UUID newInvItem = UUID.Random(); |
@@ -813,7 +813,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
813 | 813 | ||
814 | List<UUID> textures = new List<UUID>(); | 814 | List<UUID> textures = new List<UUID>(); |
815 | 815 | ||
816 | 816 | ||
817 | // if (doTextInv) | 817 | // if (doTextInv) |
818 | m_Scene.TryGetClient(m_HostCapsObj.AgentID, out client); | 818 | m_Scene.TryGetClient(m_HostCapsObj.AgentID, out client); |
819 | 819 | ||
@@ -895,7 +895,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
895 | meshAvatarSkeletons.Add(curAvSkeleton); | 895 | meshAvatarSkeletons.Add(curAvSkeleton); |
896 | meshAvatarColliders.Add(curAvCollider); | 896 | meshAvatarColliders.Add(curAvCollider); |
897 | 897 | ||
898 | // test code | 898 | // test code |
899 | if (curAvSkeleton && client != null) | 899 | if (curAvSkeleton && client != null) |
900 | { | 900 | { |
901 | string name = assetName; | 901 | string name = assetName; |
@@ -1054,7 +1054,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
1054 | prim.LastOwnerID = creatorID; | 1054 | prim.LastOwnerID = creatorID; |
1055 | prim.RezzerID = creatorID; | 1055 | prim.RezzerID = creatorID; |
1056 | prim.CreationDate = Util.UnixTimeSinceEpoch(); | 1056 | prim.CreationDate = Util.UnixTimeSinceEpoch(); |
1057 | 1057 | ||
1058 | if (grp == null) | 1058 | if (grp == null) |
1059 | prim.Name = assetName; | 1059 | prim.Name = assetName; |
1060 | else | 1060 | else |
@@ -1437,7 +1437,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
1437 | public string GetObjectCost(string request, string path, | 1437 | public string GetObjectCost(string request, string path, |
1438 | string param, IOSHttpRequest httpRequest, | 1438 | string param, IOSHttpRequest httpRequest, |
1439 | IOSHttpResponse httpResponse) | 1439 | IOSHttpResponse httpResponse) |
1440 | { | 1440 | { |
1441 | OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request); | 1441 | OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request); |
1442 | OSDMap resp = new OSDMap(); | 1442 | OSDMap resp = new OSDMap(); |
1443 | 1443 | ||
@@ -1446,7 +1446,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
1446 | for (int i = 0; i < object_ids.Count; i++) | 1446 | for (int i = 0; i < object_ids.Count; i++) |
1447 | { | 1447 | { |
1448 | UUID uuid = object_ids[i].AsUUID(); | 1448 | UUID uuid = object_ids[i].AsUUID(); |
1449 | 1449 | ||
1450 | SceneObjectPart part = m_Scene.GetSceneObjectPart(uuid); | 1450 | SceneObjectPart part = m_Scene.GetSceneObjectPart(uuid); |
1451 | SceneObjectGroup grp = null; | 1451 | SceneObjectGroup grp = null; |
1452 | if (part != null) | 1452 | if (part != null) |
@@ -1479,7 +1479,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
1479 | resp[UUID.Zero.ToString()] = object_data; | 1479 | resp[UUID.Zero.ToString()] = object_data; |
1480 | } | 1480 | } |
1481 | string response = OSDParser.SerializeLLSDXmlString(resp); | 1481 | string response = OSDParser.SerializeLLSDXmlString(resp); |
1482 | return response; | 1482 | return response; |
1483 | } | 1483 | } |
1484 | 1484 | ||
1485 | public string ResourceCostSelected(string request, string path, | 1485 | public string ResourceCostSelected(string request, string path, |
@@ -1548,7 +1548,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
1548 | resp["selected"] = object_data; | 1548 | resp["selected"] = object_data; |
1549 | // resp["transaction_id"] = "undef"; | 1549 | // resp["transaction_id"] = "undef"; |
1550 | string response = OSDParser.SerializeLLSDXmlString(resp); | 1550 | string response = OSDParser.SerializeLLSDXmlString(resp); |
1551 | return response; | 1551 | return response; |
1552 | } | 1552 | } |
1553 | 1553 | ||
1554 | public string UpdateAgentInformation(string request, string path, | 1554 | public string UpdateAgentInformation(string request, string path, |
@@ -1564,7 +1564,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
1564 | resp["access_prefs"] = accessPrefs; | 1564 | resp["access_prefs"] = accessPrefs; |
1565 | 1565 | ||
1566 | string response = OSDParser.SerializeLLSDXmlString(resp); | 1566 | string response = OSDParser.SerializeLLSDXmlString(resp); |
1567 | return response; | 1567 | return response; |
1568 | } | 1568 | } |
1569 | 1569 | ||
1570 | public bool OSDMapTOVector3(OSDMap map, out Vector3 v) | 1570 | public bool OSDMapTOVector3(OSDMap map, out Vector3 v) |
@@ -1598,19 +1598,19 @@ namespace OpenSim.Region.ClientStack.Linden | |||
1598 | 1598 | ||
1599 | IClientAPI client = null; | 1599 | IClientAPI client = null; |
1600 | ScenePresence sp; | 1600 | ScenePresence sp; |
1601 | 1601 | ||
1602 | while(true) | 1602 | while(true) |
1603 | { | 1603 | { |
1604 | if(m_Scene.GridUserService == null) | 1604 | if(m_Scene.GridUserService == null) |
1605 | break; | 1605 | break; |
1606 | 1606 | ||
1607 | if(m_Scene.UserManagementModule == null) | 1607 | if(m_Scene.UserManagementModule == null) |
1608 | break; | 1608 | break; |
1609 | 1609 | ||
1610 | m_Scene.TryGetScenePresence(m_AgentID, out sp); | 1610 | m_Scene.TryGetScenePresence(m_AgentID, out sp); |
1611 | if(sp == null || sp.IsChildAgent || sp.IsDeleted || sp.IsInTransit) | 1611 | if(sp == null || sp.IsChildAgent || sp.IsDeleted || sp.IsInTransit) |
1612 | break; | 1612 | break; |
1613 | 1613 | ||
1614 | client = sp.ControllingClient; | 1614 | client = sp.ControllingClient; |
1615 | 1615 | ||
1616 | if(!m_Scene.UserManagementModule.IsLocalGridUser(m_AgentID)) | 1616 | if(!m_Scene.UserManagementModule.IsLocalGridUser(m_AgentID)) |
@@ -1637,7 +1637,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
1637 | ILandObject land = m_Scene.LandChannel.GetLandObject(pos); | 1637 | ILandObject land = m_Scene.LandChannel.GetLandObject(pos); |
1638 | if(land == null) | 1638 | if(land == null) |
1639 | break; | 1639 | break; |
1640 | 1640 | ||
1641 | ulong gpowers = client.GetGroupPowers(land.LandData.GroupID); | 1641 | ulong gpowers = client.GetGroupPowers(land.LandData.GroupID); |
1642 | SceneObjectGroup telehub = null; | 1642 | SceneObjectGroup telehub = null; |
1643 | if (m_Scene.RegionInfo.RegionSettings.TelehubObject != UUID.Zero) | 1643 | if (m_Scene.RegionInfo.RegionSettings.TelehubObject != UUID.Zero) |
@@ -1648,7 +1648,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
1648 | !m_Scene.Permissions.IsGod(m_AgentID) && | 1648 | !m_Scene.Permissions.IsGod(m_AgentID) && |
1649 | m_AgentID != land.LandData.OwnerID && // (b) land owners can set home | 1649 | m_AgentID != land.LandData.OwnerID && // (b) land owners can set home |
1650 | // (c) members of the land-associated group in roles that can set home | 1650 | // (c) members of the land-associated group in roles that can set home |
1651 | ((gpowers & (ulong)GroupPowers.AllowSetHome) != (ulong)GroupPowers.AllowSetHome) && | 1651 | ((gpowers & (ulong)GroupPowers.AllowSetHome) != (ulong)GroupPowers.AllowSetHome) && |
1652 | // (d) parcels with telehubs can be the home of anyone | 1652 | // (d) parcels with telehubs can be the home of anyone |
1653 | (telehub == null || !land.ContainsPoint((int)telehub.AbsolutePosition.X, (int)telehub.AbsolutePosition.Y))) | 1653 | (telehub == null || !land.ContainsPoint((int)telehub.AbsolutePosition.X, (int)telehub.AbsolutePosition.Y))) |
1654 | { | 1654 | { |
@@ -1675,7 +1675,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
1675 | 1675 | ||
1676 | break; | 1676 | break; |
1677 | } | 1677 | } |
1678 | 1678 | ||
1679 | string response; | 1679 | string response; |
1680 | 1680 | ||
1681 | if(fail) | 1681 | if(fail) |
@@ -1728,11 +1728,11 @@ namespace OpenSim.Region.ClientStack.Linden | |||
1728 | m_GroupsModule = m_Scene.RequestModuleInterface<IGroupsModule>(); | 1728 | m_GroupsModule = m_Scene.RequestModuleInterface<IGroupsModule>(); |
1729 | if(m_GroupsModule == null) | 1729 | if(m_GroupsModule == null) |
1730 | break; | 1730 | break; |
1731 | 1731 | ||
1732 | m_Scene.TryGetScenePresence(m_AgentID, out sp); | 1732 | m_Scene.TryGetScenePresence(m_AgentID, out sp); |
1733 | if(sp == null || sp.IsChildAgent || sp.IsDeleted || sp.IsInTransit) | 1733 | if(sp == null || sp.IsChildAgent || sp.IsDeleted || sp.IsInTransit) |
1734 | break; | 1734 | break; |
1735 | 1735 | ||
1736 | client = sp.ControllingClient; | 1736 | client = sp.ControllingClient; |
1737 | 1737 | ||
1738 | OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request); | 1738 | OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request); |
@@ -1866,12 +1866,12 @@ namespace OpenSim.Region.ClientStack.Linden | |||
1866 | OSDMap osdname = new OSDMap(); | 1866 | OSDMap osdname = new OSDMap(); |
1867 | if(parts[0] == "Unknown") | 1867 | if(parts[0] == "Unknown") |
1868 | { | 1868 | { |
1869 | osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddHours(1)); | 1869 | osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddHours(1)); |
1870 | osdname["display_name_expires"] = OSD.FromDate(DateTime.UtcNow.AddHours(2)); | 1870 | osdname["display_name_expires"] = OSD.FromDate(DateTime.UtcNow.AddHours(2)); |
1871 | } | 1871 | } |
1872 | else | 1872 | else |
1873 | { | 1873 | { |
1874 | osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddDays(8)); | 1874 | osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddDays(8)); |
1875 | osdname["display_name_expires"] = OSD.FromDate(DateTime.UtcNow.AddMonths(1)); | 1875 | osdname["display_name_expires"] = OSD.FromDate(DateTime.UtcNow.AddMonths(1)); |
1876 | } | 1876 | } |
1877 | osdname["display_name"] = OSD.FromString(kvp.Value); | 1877 | osdname["display_name"] = OSD.FromString(kvp.Value); |
@@ -1916,7 +1916,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
1916 | private string m_assetType = String.Empty; | 1916 | private string m_assetType = String.Empty; |
1917 | private int m_cost; | 1917 | private int m_cost; |
1918 | private string m_error = String.Empty; | 1918 | private string m_error = String.Empty; |
1919 | 1919 | ||
1920 | private Timer m_timeoutTimer = new Timer(); | 1920 | private Timer m_timeoutTimer = new Timer(); |
1921 | private UUID m_texturesFolder; | 1921 | private UUID m_texturesFolder; |
1922 | private int m_nreqtextures; | 1922 | private int m_nreqtextures; |
@@ -1928,7 +1928,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
1928 | private int m_groupMask; | 1928 | private int m_groupMask; |
1929 | private int m_everyoneMask; | 1929 | private int m_everyoneMask; |
1930 | 1930 | ||
1931 | 1931 | ||
1932 | public AssetUploader(string assetName, string description, UUID assetID, UUID inventoryItem, | 1932 | public AssetUploader(string assetName, string description, UUID assetID, UUID inventoryItem, |
1933 | UUID parentFolderID, string invType, string assetType, string path, | 1933 | UUID parentFolderID, string invType, string assetType, string path, |
1934 | IHttpServer httpServer, bool dumpAssetsToFile, | 1934 | IHttpServer httpServer, bool dumpAssetsToFile, |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs index 5b4e0da..683c3d5 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs | |||
@@ -63,7 +63,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
63 | { | 63 | { |
64 | } | 64 | } |
65 | 65 | ||
66 | public void Close() { } | 66 | public void Close() { } |
67 | 67 | ||
68 | public void AddRegion(Scene scene) | 68 | public void AddRegion(Scene scene) |
69 | { | 69 | { |
@@ -80,7 +80,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
80 | } | 80 | } |
81 | 81 | ||
82 | public void PostInitialise() { } | 82 | public void PostInitialise() { } |
83 | #endregion | 83 | #endregion |
84 | 84 | ||
85 | private void OnRegisterCaps(UUID agentID, Caps caps) | 85 | private void OnRegisterCaps(UUID agentID, Caps caps) |
86 | { | 86 | { |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs index fb22694..eb1ab45 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs | |||
@@ -51,7 +51,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
51 | { | 51 | { |
52 | public struct ModelPrimLimits | 52 | public struct ModelPrimLimits |
53 | { | 53 | { |
54 | 54 | ||
55 | } | 55 | } |
56 | 56 | ||
57 | public class ModelCost | 57 | public class ModelCost |
@@ -82,9 +82,9 @@ namespace OpenSim.Region.ClientStack.Linden | |||
82 | const float lowestSizeWth = 2f; // 3x | 82 | const float lowestSizeWth = 2f; // 3x |
83 | // favor potencially physical optimized meshs versus automatic decomposition | 83 | // favor potencially physical optimized meshs versus automatic decomposition |
84 | const float physMeshSizeWth = 6f; // counts 7x | 84 | const float physMeshSizeWth = 6f; // counts 7x |
85 | const float physHullSizeWth = 8f; // counts 9x | 85 | const float physHullSizeWth = 8f; // counts 9x |
86 | 86 | ||
87 | // stream cost area factors | 87 | // stream cost area factors |
88 | // more or less like SL | 88 | // more or less like SL |
89 | const float highLodFactor = 17.36f; | 89 | const float highLodFactor = 17.36f; |
90 | const float midLodFactor = 277.78f; | 90 | const float midLodFactor = 277.78f; |
@@ -108,7 +108,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
108 | PrimScaleMin = scene.m_minNonphys; | 108 | PrimScaleMin = scene.m_minNonphys; |
109 | NonPhysicalPrimScaleMax = scene.m_maxNonphys; | 109 | NonPhysicalPrimScaleMax = scene.m_maxNonphys; |
110 | PhysicalPrimScaleMax = scene.m_maxPhys; | 110 | PhysicalPrimScaleMax = scene.m_maxPhys; |
111 | ObjectLinkedPartsMax = scene.m_linksetCapacity; | 111 | ObjectLinkedPartsMax = scene.m_linksetCapacity; |
112 | } | 112 | } |
113 | 113 | ||
114 | public void Econfig(IConfig EconomyConfig) | 114 | public void Econfig(IConfig EconomyConfig) |
@@ -121,7 +121,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
121 | bytecost = EconomyConfig.GetFloat("ModelMeshByteCost", bytecost); | 121 | bytecost = EconomyConfig.GetFloat("ModelMeshByteCost", bytecost); |
122 | } | 122 | } |
123 | 123 | ||
124 | // storage for a single mesh asset cost parameters | 124 | // storage for a single mesh asset cost parameters |
125 | private class ameshCostParam | 125 | private class ameshCostParam |
126 | { | 126 | { |
127 | // LOD sizes for size dependent streaming cost | 127 | // LOD sizes for size dependent streaming cost |
@@ -140,7 +140,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
140 | // resources input LLSD request | 140 | // resources input LLSD request |
141 | // basicCost input region assets upload cost | 141 | // basicCost input region assets upload cost |
142 | // totalcost returns model total upload fee | 142 | // totalcost returns model total upload fee |
143 | // meshcostdata returns detailed costs for viewer | 143 | // meshcostdata returns detailed costs for viewer |
144 | // avatarSkeleton if mesh includes a avatar skeleton | 144 | // avatarSkeleton if mesh includes a avatar skeleton |
145 | // useAvatarCollider if we should use physics mesh for avatar | 145 | // useAvatarCollider if we should use physics mesh for avatar |
146 | public bool MeshModelCost(LLSDAssetResource resources, int basicCost, out int totalcost, | 146 | public bool MeshModelCost(LLSDAssetResource resources, int basicCost, out int totalcost, |
@@ -150,7 +150,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
150 | error = string.Empty; | 150 | error = string.Empty; |
151 | 151 | ||
152 | bool avatarSkeleton = false; | 152 | bool avatarSkeleton = false; |
153 | 153 | ||
154 | if (resources == null || | 154 | if (resources == null || |
155 | resources.instance_list == null || | 155 | resources.instance_list == null || |
156 | resources.instance_list.Array.Count == 0) | 156 | resources.instance_list.Array.Count == 0) |
@@ -203,7 +203,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
203 | if (resources.mesh_list != null && resources.mesh_list.Array.Count > 0) | 203 | if (resources.mesh_list != null && resources.mesh_list.Array.Count > 0) |
204 | { | 204 | { |
205 | numberMeshs = resources.mesh_list.Array.Count; | 205 | numberMeshs = resources.mesh_list.Array.Count; |
206 | 206 | ||
207 | for (int i = 0; i < numberMeshs; i++) | 207 | for (int i = 0; i < numberMeshs; i++) |
208 | { | 208 | { |
209 | ameshCostParam curCost = new ameshCostParam(); | 209 | ameshCostParam curCost = new ameshCostParam(); |
@@ -230,7 +230,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
230 | } | 230 | } |
231 | 231 | ||
232 | // instances (prims) cost | 232 | // instances (prims) cost |
233 | 233 | ||
234 | 234 | ||
235 | int mesh; | 235 | int mesh; |
236 | int skipedSmall = 0; | 236 | int skipedSmall = 0; |
@@ -331,7 +331,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
331 | 331 | ||
332 | // breakdown prices | 332 | // breakdown prices |
333 | // don't seem to be in use so removed code for now | 333 | // don't seem to be in use so removed code for now |
334 | 334 | ||
335 | return true; | 335 | return true; |
336 | } | 336 | } |
337 | 337 | ||
@@ -404,7 +404,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
404 | int sksize = tmpmap["size"].AsInteger(); | 404 | int sksize = tmpmap["size"].AsInteger(); |
405 | if(sksize > 0) | 405 | if(sksize > 0) |
406 | skeleton = true; | 406 | skeleton = true; |
407 | } | 407 | } |
408 | } | 408 | } |
409 | 409 | ||
410 | if (map.ContainsKey("physics_convex")) | 410 | if (map.ContainsKey("physics_convex")) |
@@ -429,7 +429,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
429 | } | 429 | } |
430 | 430 | ||
431 | submesh_offset = -1; | 431 | submesh_offset = -1; |
432 | 432 | ||
433 | // only look for LOD meshs sizes | 433 | // only look for LOD meshs sizes |
434 | 434 | ||
435 | if (map.ContainsKey("high_lod")) | 435 | if (map.ContainsKey("high_lod")) |
@@ -518,7 +518,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
518 | cost.physicsCost = 0.04f * phys_hullsvertices; | 518 | cost.physicsCost = 0.04f * phys_hullsvertices; |
519 | 519 | ||
520 | float sfee; | 520 | float sfee; |
521 | 521 | ||
522 | sfee = data.Length; // start with total compressed data size | 522 | sfee = data.Length; // start with total compressed data size |
523 | 523 | ||
524 | // penalize lod meshs that should be more builder optimized | 524 | // penalize lod meshs that should be more builder optimized |
@@ -535,7 +535,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
535 | 535 | ||
536 | // bytes to money | 536 | // bytes to money |
537 | sfee *= bytecost; | 537 | sfee *= bytecost; |
538 | 538 | ||
539 | cost.costFee = sfee; | 539 | cost.costFee = sfee; |
540 | return true; | 540 | return true; |
541 | } | 541 | } |
@@ -675,7 +675,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
675 | return true; | 675 | return true; |
676 | } | 676 | } |
677 | 677 | ||
678 | // returns streaming cost from on mesh LODs sizes in curCost and square of prim size length | 678 | // returns streaming cost from on mesh LODs sizes in curCost and square of prim size length |
679 | private float streamingCost(ameshCostParam curCost, float sqdiam) | 679 | private float streamingCost(ameshCostParam curCost, float sqdiam) |
680 | { | 680 | { |
681 | // compute efective areas | 681 | // compute efective areas |