From b16abc8166c29585cb76cc55c3bdd76e5833cb4f Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Thu, 5 Jan 2017 19:07:37 +0000 Subject: Massive tab and trailing space cleanup --- .../Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 60 +++++++++++----------- .../Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs | 4 +- .../Linden/Caps/BunchOfCaps/MeshCost.cs | 30 +++++------ 3 files changed, 47 insertions(+), 47 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps') 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 private ModelCost m_ModelCost; // private static readonly string m_remoteParcelRequestPath = "0009/";// This is in the LandManagementModule. - + // These are callbacks which will be setup by the scene so that we can update scene data when we // receive capability calls public NewInventoryItem AddNewInventoryItem = null; @@ -119,7 +119,7 @@ namespace OpenSim.Region.ClientStack.Linden private bool m_enableModelUploadTextureToInventory = false; // place uploaded textures also in inventory // may not be visible till relog - + private bool m_RestrictFreeTestUploadPerms = false; // reduces also the permitions. Needs a creator defined!! private UUID m_testAssetsCreatorID = UUID.Zero; @@ -138,7 +138,7 @@ namespace OpenSim.Region.ClientStack.Linden processUpload = 3 } private FileAgentInventoryState m_FileAgentInventoryState = FileAgentInventoryState.idle; - + public BunchOfCaps(Scene scene, UUID agentID, Caps caps) { m_Scene = scene; @@ -147,7 +147,7 @@ namespace OpenSim.Region.ClientStack.Linden // create a model upload cost provider m_ModelCost = new ModelCost(scene); - + m_PrimScaleMin = m_ModelCost.PrimScaleMin; IConfigSource config = m_Scene.Config; @@ -216,7 +216,7 @@ namespace OpenSim.Region.ClientStack.Linden public string GetNewCapPath() { - return "/CAPS/" + UUID.Random(); + return "/CAPS/" + UUID.Random(); } /// @@ -271,7 +271,7 @@ namespace OpenSim.Region.ClientStack.Linden "POST", GetNewCapPath(), HomeLocation, "HomeLocation", null); m_HostCapsObj.RegisterHandler("HomeLocation", HomeLocationHandler); } - + if(m_AllowCapGroupMemberData) { IRequestHandler GroupMemberDataHandler = new RestStreamHandler( @@ -314,7 +314,7 @@ namespace OpenSim.Region.ClientStack.Linden IRequestHandler CopyInventoryFromNotecardHandler = new RestStreamHandler( "POST", GetNewCapPath(), CopyInventoryFromNotecard, "CopyInventoryFromNotecard", null); m_HostCapsObj.RegisterHandler("CopyInventoryFromNotecard", CopyInventoryFromNotecardHandler); - + } catch (Exception e) { @@ -568,8 +568,8 @@ namespace OpenSim.Region.ClientStack.Linden { string error; int modelcost; - - + + if (!m_ModelCost.MeshModelCost(llsdRequest.asset_resources, baseCost, out modelcost, meshcostdata, out error, ref warning)) { @@ -639,7 +639,7 @@ namespace OpenSim.Region.ClientStack.Linden client.SendAgentAlertMessage(warning, true); } } - + string assetDes = llsdRequest.description; UUID newAsset = UUID.Random(); UUID newInvItem = UUID.Random(); @@ -813,7 +813,7 @@ namespace OpenSim.Region.ClientStack.Linden List textures = new List(); - + // if (doTextInv) m_Scene.TryGetClient(m_HostCapsObj.AgentID, out client); @@ -895,7 +895,7 @@ namespace OpenSim.Region.ClientStack.Linden meshAvatarSkeletons.Add(curAvSkeleton); meshAvatarColliders.Add(curAvCollider); - // test code + // test code if (curAvSkeleton && client != null) { string name = assetName; @@ -1054,7 +1054,7 @@ namespace OpenSim.Region.ClientStack.Linden prim.LastOwnerID = creatorID; prim.RezzerID = creatorID; prim.CreationDate = Util.UnixTimeSinceEpoch(); - + if (grp == null) prim.Name = assetName; else @@ -1437,7 +1437,7 @@ namespace OpenSim.Region.ClientStack.Linden public string GetObjectCost(string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) - { + { OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request); OSDMap resp = new OSDMap(); @@ -1446,7 +1446,7 @@ namespace OpenSim.Region.ClientStack.Linden for (int i = 0; i < object_ids.Count; i++) { UUID uuid = object_ids[i].AsUUID(); - + SceneObjectPart part = m_Scene.GetSceneObjectPart(uuid); SceneObjectGroup grp = null; if (part != null) @@ -1479,7 +1479,7 @@ namespace OpenSim.Region.ClientStack.Linden resp[UUID.Zero.ToString()] = object_data; } string response = OSDParser.SerializeLLSDXmlString(resp); - return response; + return response; } public string ResourceCostSelected(string request, string path, @@ -1548,7 +1548,7 @@ namespace OpenSim.Region.ClientStack.Linden resp["selected"] = object_data; // resp["transaction_id"] = "undef"; string response = OSDParser.SerializeLLSDXmlString(resp); - return response; + return response; } public string UpdateAgentInformation(string request, string path, @@ -1564,7 +1564,7 @@ namespace OpenSim.Region.ClientStack.Linden resp["access_prefs"] = accessPrefs; string response = OSDParser.SerializeLLSDXmlString(resp); - return response; + return response; } public bool OSDMapTOVector3(OSDMap map, out Vector3 v) @@ -1598,19 +1598,19 @@ namespace OpenSim.Region.ClientStack.Linden IClientAPI client = null; ScenePresence sp; - + while(true) { if(m_Scene.GridUserService == null) break; - + if(m_Scene.UserManagementModule == null) break; m_Scene.TryGetScenePresence(m_AgentID, out sp); if(sp == null || sp.IsChildAgent || sp.IsDeleted || sp.IsInTransit) break; - + client = sp.ControllingClient; if(!m_Scene.UserManagementModule.IsLocalGridUser(m_AgentID)) @@ -1637,7 +1637,7 @@ namespace OpenSim.Region.ClientStack.Linden ILandObject land = m_Scene.LandChannel.GetLandObject(pos); if(land == null) break; - + ulong gpowers = client.GetGroupPowers(land.LandData.GroupID); SceneObjectGroup telehub = null; if (m_Scene.RegionInfo.RegionSettings.TelehubObject != UUID.Zero) @@ -1648,7 +1648,7 @@ namespace OpenSim.Region.ClientStack.Linden !m_Scene.Permissions.IsGod(m_AgentID) && m_AgentID != land.LandData.OwnerID && // (b) land owners can set home // (c) members of the land-associated group in roles that can set home - ((gpowers & (ulong)GroupPowers.AllowSetHome) != (ulong)GroupPowers.AllowSetHome) && + ((gpowers & (ulong)GroupPowers.AllowSetHome) != (ulong)GroupPowers.AllowSetHome) && // (d) parcels with telehubs can be the home of anyone (telehub == null || !land.ContainsPoint((int)telehub.AbsolutePosition.X, (int)telehub.AbsolutePosition.Y))) { @@ -1675,7 +1675,7 @@ namespace OpenSim.Region.ClientStack.Linden break; } - + string response; if(fail) @@ -1728,11 +1728,11 @@ namespace OpenSim.Region.ClientStack.Linden m_GroupsModule = m_Scene.RequestModuleInterface(); if(m_GroupsModule == null) break; - + m_Scene.TryGetScenePresence(m_AgentID, out sp); if(sp == null || sp.IsChildAgent || sp.IsDeleted || sp.IsInTransit) break; - + client = sp.ControllingClient; OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request); @@ -1866,12 +1866,12 @@ namespace OpenSim.Region.ClientStack.Linden OSDMap osdname = new OSDMap(); if(parts[0] == "Unknown") { - osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddHours(1)); + osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddHours(1)); osdname["display_name_expires"] = OSD.FromDate(DateTime.UtcNow.AddHours(2)); } else { - osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddDays(8)); + osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddDays(8)); osdname["display_name_expires"] = OSD.FromDate(DateTime.UtcNow.AddMonths(1)); } osdname["display_name"] = OSD.FromString(kvp.Value); @@ -1916,7 +1916,7 @@ namespace OpenSim.Region.ClientStack.Linden private string m_assetType = String.Empty; private int m_cost; private string m_error = String.Empty; - + private Timer m_timeoutTimer = new Timer(); private UUID m_texturesFolder; private int m_nreqtextures; @@ -1928,7 +1928,7 @@ namespace OpenSim.Region.ClientStack.Linden private int m_groupMask; private int m_everyoneMask; - + public AssetUploader(string assetName, string description, UUID assetID, UUID inventoryItem, UUID parentFolderID, string invType, string assetType, string path, 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 { } - public void Close() { } + public void Close() { } public void AddRegion(Scene scene) { @@ -80,7 +80,7 @@ namespace OpenSim.Region.ClientStack.Linden } public void PostInitialise() { } - #endregion + #endregion private void OnRegisterCaps(UUID agentID, Caps caps) { 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 { public struct ModelPrimLimits { - + } public class ModelCost @@ -82,9 +82,9 @@ namespace OpenSim.Region.ClientStack.Linden const float lowestSizeWth = 2f; // 3x // favor potencially physical optimized meshs versus automatic decomposition const float physMeshSizeWth = 6f; // counts 7x - const float physHullSizeWth = 8f; // counts 9x + const float physHullSizeWth = 8f; // counts 9x - // stream cost area factors + // stream cost area factors // more or less like SL const float highLodFactor = 17.36f; const float midLodFactor = 277.78f; @@ -108,7 +108,7 @@ namespace OpenSim.Region.ClientStack.Linden PrimScaleMin = scene.m_minNonphys; NonPhysicalPrimScaleMax = scene.m_maxNonphys; PhysicalPrimScaleMax = scene.m_maxPhys; - ObjectLinkedPartsMax = scene.m_linksetCapacity; + ObjectLinkedPartsMax = scene.m_linksetCapacity; } public void Econfig(IConfig EconomyConfig) @@ -121,7 +121,7 @@ namespace OpenSim.Region.ClientStack.Linden bytecost = EconomyConfig.GetFloat("ModelMeshByteCost", bytecost); } - // storage for a single mesh asset cost parameters + // storage for a single mesh asset cost parameters private class ameshCostParam { // LOD sizes for size dependent streaming cost @@ -140,7 +140,7 @@ namespace OpenSim.Region.ClientStack.Linden // resources input LLSD request // basicCost input region assets upload cost // totalcost returns model total upload fee - // meshcostdata returns detailed costs for viewer + // meshcostdata returns detailed costs for viewer // avatarSkeleton if mesh includes a avatar skeleton // useAvatarCollider if we should use physics mesh for avatar public bool MeshModelCost(LLSDAssetResource resources, int basicCost, out int totalcost, @@ -150,7 +150,7 @@ namespace OpenSim.Region.ClientStack.Linden error = string.Empty; bool avatarSkeleton = false; - + if (resources == null || resources.instance_list == null || resources.instance_list.Array.Count == 0) @@ -203,7 +203,7 @@ namespace OpenSim.Region.ClientStack.Linden if (resources.mesh_list != null && resources.mesh_list.Array.Count > 0) { numberMeshs = resources.mesh_list.Array.Count; - + for (int i = 0; i < numberMeshs; i++) { ameshCostParam curCost = new ameshCostParam(); @@ -230,7 +230,7 @@ namespace OpenSim.Region.ClientStack.Linden } // instances (prims) cost - + int mesh; int skipedSmall = 0; @@ -331,7 +331,7 @@ namespace OpenSim.Region.ClientStack.Linden // breakdown prices // don't seem to be in use so removed code for now - + return true; } @@ -404,7 +404,7 @@ namespace OpenSim.Region.ClientStack.Linden int sksize = tmpmap["size"].AsInteger(); if(sksize > 0) skeleton = true; - } + } } if (map.ContainsKey("physics_convex")) @@ -429,7 +429,7 @@ namespace OpenSim.Region.ClientStack.Linden } submesh_offset = -1; - + // only look for LOD meshs sizes if (map.ContainsKey("high_lod")) @@ -518,7 +518,7 @@ namespace OpenSim.Region.ClientStack.Linden cost.physicsCost = 0.04f * phys_hullsvertices; float sfee; - + sfee = data.Length; // start with total compressed data size // penalize lod meshs that should be more builder optimized @@ -535,7 +535,7 @@ namespace OpenSim.Region.ClientStack.Linden // bytes to money sfee *= bytecost; - + cost.costFee = sfee; return true; } @@ -675,7 +675,7 @@ namespace OpenSim.Region.ClientStack.Linden return true; } - // returns streaming cost from on mesh LODs sizes in curCost and square of prim size length + // returns streaming cost from on mesh LODs sizes in curCost and square of prim size length private float streamingCost(ameshCostParam curCost, float sqdiam) { // compute efective areas -- cgit v1.1