From 3585130ac8b805296323105a5b50c5d416210266 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 31 Jan 2011 02:42:22 -0500 Subject: SetTexture_fix --- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 30fb252..38a16a4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -1750,13 +1750,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { UUID textureID=new UUID(); - if (!UUID.TryParse(texture, out textureID)) - { - textureID=InventoryKey(texture, (int)AssetType.Texture); - } - - if (textureID == UUID.Zero) - return; + textureID=InventoryKey(texture, (int)AssetType.Texture); + if (textureID == UUID.Zero) + { + if (!UUID.TryParse(texture, out textureID)) + return; + } Primitive.TextureEntry tex = part.Shape.Textures; -- cgit v1.1 From bc2e254b55b65cf267b8027e3e696acbc0f3c60b Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 4 Feb 2011 21:55:22 +0000 Subject: minor: fix indentation, spacing on commit 3585130 this previous commit tries to look up the texture by name first before just using the uuid. this allows correct resolution of inventory textures which have uuids as names. --- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 38a16a4..e8da274 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -1748,14 +1748,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api protected void SetTexture(SceneObjectPart part, string texture, int face) { - UUID textureID=new UUID(); - - textureID=InventoryKey(texture, (int)AssetType.Texture); - if (textureID == UUID.Zero) - { - if (!UUID.TryParse(texture, out textureID)) - return; - } + UUID textureID = new UUID(); + + textureID = InventoryKey(texture, (int)AssetType.Texture); + if (textureID == UUID.Zero) + { + if (!UUID.TryParse(texture, out textureID)) + return; + } Primitive.TextureEntry tex = part.Shape.Textures; -- cgit v1.1 From 722f0ba18cbea725235f1c31cf3bd3d6a66def29 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 4 Feb 2011 23:06:24 +0000 Subject: Put something in the ImprovedInstantMessage.BinaryBucket for llInstantMessage() to stop this crashing viewer 2.4.0 (1.23.5 was fine with this). We're putting in a string of format " which appears to be the expected value. This resolves http://opensimulator.org/mantis/view.php?id=5356 --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index e8da274..73fe160 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -3063,12 +3063,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api msg.ParentEstateID = 0; //ParentEstateID; msg.Position = Vector3.Zero;// new Vector3(m_host.AbsolutePosition); msg.RegionID = World.RegionInfo.RegionID.Guid;//RegionID.Guid; - msg.binaryBucket = new byte[0];// binaryBucket; + msg.binaryBucket + = Util.StringToBytes256( + "{0}/{1}/{2}/{3}", + World.RegionInfo.RegionName, + (int)Math.Floor(m_host.AbsolutePosition.X), + (int)Math.Floor(m_host.AbsolutePosition.Y), + (int)Math.Floor(m_host.AbsolutePosition.Z)); if (m_TransferModule != null) { m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); } + ScriptSleep(2000); } -- cgit v1.1 From 5b7a5a5b8b6221b2fe42f645c757c2e5e9132aa6 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 4 Feb 2011 23:14:21 +0000 Subject: Add position to IM sent from llInstantMessage(), to better fulfill client expectations --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 73fe160..72ee495 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -3061,7 +3061,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api msg.fromGroup = false;// fromGroup; msg.offline = (byte)0; //offline; msg.ParentEstateID = 0; //ParentEstateID; - msg.Position = Vector3.Zero;// new Vector3(m_host.AbsolutePosition); + msg.Position = new Vector3(m_host.AbsolutePosition); msg.RegionID = World.RegionInfo.RegionID.Guid;//RegionID.Guid; msg.binaryBucket = Util.StringToBytes256( -- cgit v1.1 From cdd64bb8f51df51858b841de4def7808735b02dd Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 5 Feb 2011 00:15:25 +0000 Subject: For now, reinstate the call to World.GridService.GetRegionsByName() commented out in 933f47e Even though we don't use the results, just getting the regions may have side effects in making hypergrid links available for the later World.RequestTeleportLocation() --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index c0c790d..3f8735e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -702,7 +702,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // and convert the regionName to the target region if (regionName.Contains(".") && regionName.Contains(":")) { -// List regions = World.GridService.GetRegionsByName(World.RegionInfo.ScopeID, regionName, 1); + World.GridService.GetRegionsByName(World.RegionInfo.ScopeID, regionName, 1); +// List regions = World.GridService.GetRegionsByName(World.RegionInfo.ScopeID, regionName, 1); + string[] parts = regionName.Split(new char[] { ':' }); if (parts.Length > 2) regionName = parts[0] + ':' + parts[1] + "/ " + parts[2]; -- cgit v1.1 From 6becaf65e15e3fde2d910925b4f7ff09971121f3 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 7 Feb 2011 22:28:59 +0000 Subject: Fix merge issues --- .../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index e6ebc6e..673ea46 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -1917,14 +1917,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api protected void SetTexture(SceneObjectPart part, string texture, int face) { -<<<<<<< HEAD:OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) return; - UUID textureID=new UUID(); -======= UUID textureID = new UUID(); ->>>>>>> master:OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs textureID = InventoryKey(texture, (int)AssetType.Texture); if (textureID == UUID.Zero) @@ -3346,15 +3342,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api msg.dialog = (byte)19; // MessageFromObject msg.fromGroup = false;// fromGroup; msg.offline = (byte)0; //offline; -<<<<<<< HEAD:OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs msg.ParentEstateID = World.RegionInfo.EstateSettings.EstateID; msg.Position = new Vector3(m_host.AbsolutePosition); msg.RegionID = World.RegionInfo.RegionID.Guid; - msg.binaryBucket = Util.StringToBytes256(m_host.OwnerID.ToString()); -======= - msg.ParentEstateID = 0; //ParentEstateID; - msg.Position = new Vector3(m_host.AbsolutePosition); - msg.RegionID = World.RegionInfo.RegionID.Guid;//RegionID.Guid; msg.binaryBucket = Util.StringToBytes256( "{0}/{1}/{2}/{3}", @@ -3362,7 +3352,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api (int)Math.Floor(m_host.AbsolutePosition.X), (int)Math.Floor(m_host.AbsolutePosition.Y), (int)Math.Floor(m_host.AbsolutePosition.Z)); ->>>>>>> master:OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs if (m_TransferModule != null) { -- cgit v1.1