diff options
author | Melanie | 2011-02-07 22:26:09 +0100 |
---|---|---|
committer | Melanie | 2011-02-07 22:26:09 +0100 |
commit | 8c20f94939347d504c175ca7afb6b456188cdf2c (patch) | |
tree | c11023fbc6e701b44128d2b54bd024abd912a1b3 /OpenSim/Region/ScriptEngine/Shared/Api | |
parent | Prevent a nonexistent inventory item from throwing an exception (diff) | |
parent | Merge branch 'master' into careminster-presence-refactor (diff) | |
download | opensim-SC_OLD-8c20f94939347d504c175ca7afb6b456188cdf2c.zip opensim-SC_OLD-8c20f94939347d504c175ca7afb6b456188cdf2c.tar.gz opensim-SC_OLD-8c20f94939347d504c175ca7afb6b456188cdf2c.tar.bz2 opensim-SC_OLD-8c20f94939347d504c175ca7afb6b456188cdf2c.tar.xz |
Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 24 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 4 |
2 files changed, 18 insertions, 10 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index cdaaab3..aa6e505 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -1920,15 +1920,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1920 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 1920 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
1921 | return; | 1921 | return; |
1922 | 1922 | ||
1923 | UUID textureID=new UUID(); | 1923 | UUID textureID = new UUID(); |
1924 | 1924 | ||
1925 | if (!UUID.TryParse(texture, out textureID)) | 1925 | textureID = InventoryKey(texture, (int)AssetType.Texture); |
1926 | { | 1926 | if (textureID == UUID.Zero) |
1927 | textureID=InventoryKey(texture, (int)AssetType.Texture); | 1927 | { |
1928 | } | 1928 | if (!UUID.TryParse(texture, out textureID)) |
1929 | 1929 | return; | |
1930 | if (textureID == UUID.Zero) | 1930 | } |
1931 | return; | ||
1932 | 1931 | ||
1933 | Primitive.TextureEntry tex = part.Shape.Textures; | 1932 | Primitive.TextureEntry tex = part.Shape.Textures; |
1934 | 1933 | ||
@@ -3346,12 +3345,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3346 | msg.ParentEstateID = World.RegionInfo.EstateSettings.EstateID; | 3345 | msg.ParentEstateID = World.RegionInfo.EstateSettings.EstateID; |
3347 | msg.Position = new Vector3(m_host.AbsolutePosition); | 3346 | msg.Position = new Vector3(m_host.AbsolutePosition); |
3348 | msg.RegionID = World.RegionInfo.RegionID.Guid; | 3347 | msg.RegionID = World.RegionInfo.RegionID.Guid; |
3349 | msg.binaryBucket = Util.StringToBytes256(m_host.OwnerID.ToString()); | 3348 | msg.binaryBucket |
3349 | = Util.StringToBytes256( | ||
3350 | "{0}/{1}/{2}/{3}", | ||
3351 | World.RegionInfo.RegionName, | ||
3352 | (int)Math.Floor(m_host.AbsolutePosition.X), | ||
3353 | (int)Math.Floor(m_host.AbsolutePosition.Y), | ||
3354 | (int)Math.Floor(m_host.AbsolutePosition.Z)); | ||
3350 | 3355 | ||
3351 | if (m_TransferModule != null) | 3356 | if (m_TransferModule != null) |
3352 | { | 3357 | { |
3353 | m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); | 3358 | m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); |
3354 | } | 3359 | } |
3360 | |||
3355 | ScriptSleep(2000); | 3361 | ScriptSleep(2000); |
3356 | } | 3362 | } |
3357 | 3363 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index cf059b3..4d299d6 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -711,7 +711,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
711 | // and convert the regionName to the target region | 711 | // and convert the regionName to the target region |
712 | if (regionName.Contains(".") && regionName.Contains(":")) | 712 | if (regionName.Contains(".") && regionName.Contains(":")) |
713 | { | 713 | { |
714 | // List<GridRegion> regions = World.GridService.GetRegionsByName(World.RegionInfo.ScopeID, regionName, 1); | 714 | World.GridService.GetRegionsByName(World.RegionInfo.ScopeID, regionName, 1); |
715 | // List<GridRegion> regions = World.GridService.GetRegionsByName(World.RegionInfo.ScopeID, regionName, 1); | ||
716 | |||
715 | string[] parts = regionName.Split(new char[] { ':' }); | 717 | string[] parts = regionName.Split(new char[] { ':' }); |
716 | if (parts.Length > 2) | 718 | if (parts.Length > 2) |
717 | regionName = parts[0] + ':' + parts[1] + "/ " + parts[2]; | 719 | regionName = parts[0] + ':' + parts[1] + "/ " + parts[2]; |