From 796ccd3d37cb132c4c4f12c791fcdf76513c5cf0 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Sun, 17 Aug 2008 02:31:45 +0000 Subject: Update svn properties, minor formatting cleanup. --- .../Modules/World/Land/LandManagementModule.cs | 26 +++++---- OpenSim/Region/Environment/Scenes/Scene.cs | 10 +++- .../Shared/Api/Implementation/LSL_Api.cs | 64 +++++++++++----------- 3 files changed, 54 insertions(+), 46 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs index 46f108e..9b1b9b5 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs @@ -1,4 +1,4 @@ -/* +/* * Copyright (c) Contributors, http://opensimulator.org/ * See CONTRIBUTORS.TXT for a full list of copyright holders. * @@ -1135,20 +1135,20 @@ namespace OpenSim.Region.Environment.Modules.World.Land { Hashtable hash = new Hashtable(); hash = (Hashtable)LLSD.LLSDDeserialize(Helpers.StringToField(request)); - if(hash.ContainsKey("region_id") && hash.ContainsKey("location")) + if (hash.ContainsKey("region_id") && hash.ContainsKey("location")) { LLUUID regionID = (LLUUID)hash["region_id"]; ArrayList list = (ArrayList)hash["location"]; uint x = (uint)(double)list[0]; uint y = (uint)(double)list[1]; - if(hash.ContainsKey("region_handle")) + if (hash.ContainsKey("region_handle")) { // if you do a "About Landmark" on a landmark a second time, the viewer sends the // region_handle it got earlier via RegionHandleRequest ulong regionHandle = Helpers.BytesToUInt64((byte[])hash["region_handle"]); parcelID = Util.BuildFakeParcelID(regionHandle, x, y); } - else if(regionID == m_scene.RegionInfo.RegionID) + else if (regionID == m_scene.RegionInfo.RegionID) { // a parcel request for a local parcel => no need to query the grid parcelID = Util.BuildFakeParcelID(m_scene.RegionInfo.RegionHandle, x, y); @@ -1157,7 +1157,8 @@ namespace OpenSim.Region.Environment.Modules.World.Land { // a parcel request for a parcel in another region. Ask the grid about the region RegionInfo info = m_scene.CommsManager.GridService.RequestNeighbourInfo(regionID); - if(info != null) parcelID = Util.BuildFakeParcelID(info.RegionHandle, x, y); + if (info != null) + parcelID = Util.BuildFakeParcelID(info.RegionHandle, x, y); } } } @@ -1182,7 +1183,8 @@ namespace OpenSim.Region.Environment.Modules.World.Land private void handleParcelInfo(IClientAPI remoteClient, LLUUID parcelID) { - if(parcelID == LLUUID.Zero) return; + if (parcelID == LLUUID.Zero) + return; // assume we've got the parcelID we just computed in RemoteParcelRequest ulong regionHandle; @@ -1191,17 +1193,19 @@ namespace OpenSim.Region.Environment.Modules.World.Land m_log.DebugFormat("[LAND] got parcelinfo request for regionHandle {0}, x/y {1}/{2}", regionHandle, x, y); LandData landData; - if(regionHandle == m_scene.RegionInfo.RegionHandle) landData = this.GetLandObject(x, y).landData; - else landData = m_scene.CommsManager.GridService.RequestLandData(regionHandle, x, y); + if (regionHandle == m_scene.RegionInfo.RegionHandle) + landData = this.GetLandObject(x, y).landData; + else + landData = m_scene.CommsManager.GridService.RequestLandData(regionHandle, x, y); - if(landData != null) + if (landData != null) { // we need to transfer the fake parcelID, not the one in landData, so the viewer can match it to the landmark. m_log.Debug("[LAND] got parcelinfo; sending"); remoteClient.SendParcelInfo(m_scene.RegionInfo, landData, parcelID, x, y); } - else m_log.Debug("[LAND] got no parcelinfo; not sending"); + else + m_log.Debug("[LAND] got no parcelinfo; not sending"); } } - } diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index f5117b9..e060f3d 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -3872,9 +3872,13 @@ namespace OpenSim.Region.Environment.Scenes public void RegionHandleRequest(IClientAPI client, LLUUID regionID) { RegionInfo info; - if(regionID == RegionInfo.RegionID) info = RegionInfo; - else info = CommsManager.GridService.RequestNeighbourInfo(regionID); - if(info != null) client.SendRegionHandle(regionID, info.RegionHandle); + if (regionID == RegionInfo.RegionID) + info = RegionInfo; + else + info = CommsManager.GridService.RequestNeighbourInfo(regionID); + + if (info != null) + client.SendRegionHandle(regionID, info.RegionHandle); } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index a1d2446..3e59129 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -1088,32 +1088,32 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return; } } - - public void SetFullBright(SceneObjectPart part, int face, bool bright) - { - LLObject.TextureEntry tex = part.Shape.Textures; + + public void SetFullBright(SceneObjectPart part, int face, bool bright) + { + LLObject.TextureEntry tex = part.Shape.Textures; if (face > -1) { - tex.CreateFace((uint) face); - tex.FaceTextures[face].Fullbright = bright; - part.UpdateTexture(tex); - return; - } - else if (face == -1) - { + tex.CreateFace((uint) face); + tex.FaceTextures[face].Fullbright = bright; + part.UpdateTexture(tex); + return; + } + else if (face == -1) + { for (uint i = 0; i < 32; i++) { if (tex.FaceTextures[i] != null) { - tex.FaceTextures[i].Fullbright = bright; - } - } - tex.DefaultTexture.Fullbright = bright; + tex.FaceTextures[i].Fullbright = bright; + } + } + tex.DefaultTexture.Fullbright = bright; part.UpdateTexture(tex); return; - } - } - + } + } + public double llGetAlpha(int face) { m_host.AddScriptLPS(1); @@ -5523,20 +5523,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api SetShiny(part, face, shiny, bump); break; - case (int)ScriptBaseClass.PRIM_FULLBRIGHT: - if (remain < 2) - return; - face = Convert.ToInt32(rules.Data[idx++]); - string bv = rules.Data[idx++].ToString(); - bool st; - if(bv.Equals("1")) - st = true; - else - st = false; - - SetFullBright(part, face , st); - break; - } + case (int)ScriptBaseClass.PRIM_FULLBRIGHT: + if (remain < 2) + return; + face = Convert.ToInt32(rules.Data[idx++]); + string bv = rules.Data[idx++].ToString(); + bool st; + if (bv.Equals("1")) + st = true; + else + st = false; + + SetFullBright(part, face , st); + break; + } } } -- cgit v1.1