diff options
author | Justin Clark-Casey (justincc) | 2011-02-04 23:06:24 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-02-04 23:07:47 +0000 |
commit | 722f0ba18cbea725235f1c31cf3bd3d6a66def29 (patch) | |
tree | 820aeeeb27238451fec4688fe578afdd93fd43cd /OpenSim | |
parent | minor: fix indentation, spacing on commit 3585130 (diff) | |
download | opensim-SC-722f0ba18cbea725235f1c31cf3bd3d6a66def29.zip opensim-SC-722f0ba18cbea725235f1c31cf3bd3d6a66def29.tar.gz opensim-SC-722f0ba18cbea725235f1c31cf3bd3d6a66def29.tar.bz2 opensim-SC-722f0ba18cbea725235f1c31cf3bd3d6a66def29.tar.xz |
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 "<region name><x pos floor int><y pos floor int><z pos floor int> which appears to be the expected value.
This resolves http://opensimulator.org/mantis/view.php?id=5356
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/Util.cs | 10 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 9 |
2 files changed, 18 insertions, 1 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index d1d8736..533e53a 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -1334,6 +1334,11 @@ namespace OpenSim.Framework | |||
1334 | return (ipaddr1 != null) ? "http://" + ipaddr1.ToString() + ":" + port1 : uri; | 1334 | return (ipaddr1 != null) ? "http://" + ipaddr1.ToString() + ":" + port1 : uri; |
1335 | } | 1335 | } |
1336 | 1336 | ||
1337 | public static byte[] StringToBytes256(string str, params object[] args) | ||
1338 | { | ||
1339 | return StringToBytes256(string.Format(str, args)); | ||
1340 | } | ||
1341 | |||
1337 | public static byte[] StringToBytes256(string str) | 1342 | public static byte[] StringToBytes256(string str) |
1338 | { | 1343 | { |
1339 | if (String.IsNullOrEmpty(str)) { return Utils.EmptyBytes; } | 1344 | if (String.IsNullOrEmpty(str)) { return Utils.EmptyBytes; } |
@@ -1352,6 +1357,11 @@ namespace OpenSim.Framework | |||
1352 | return data; | 1357 | return data; |
1353 | } | 1358 | } |
1354 | 1359 | ||
1360 | public static byte[] StringToBytes1024(string str, params object[] args) | ||
1361 | { | ||
1362 | return StringToBytes1024(string.Format(str, args)); | ||
1363 | } | ||
1364 | |||
1355 | public static byte[] StringToBytes1024(string str) | 1365 | public static byte[] StringToBytes1024(string str) |
1356 | { | 1366 | { |
1357 | if (String.IsNullOrEmpty(str)) { return Utils.EmptyBytes; } | 1367 | if (String.IsNullOrEmpty(str)) { return Utils.EmptyBytes; } |
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 | |||
3063 | msg.ParentEstateID = 0; //ParentEstateID; | 3063 | msg.ParentEstateID = 0; //ParentEstateID; |
3064 | msg.Position = Vector3.Zero;// new Vector3(m_host.AbsolutePosition); | 3064 | msg.Position = Vector3.Zero;// new Vector3(m_host.AbsolutePosition); |
3065 | msg.RegionID = World.RegionInfo.RegionID.Guid;//RegionID.Guid; | 3065 | msg.RegionID = World.RegionInfo.RegionID.Guid;//RegionID.Guid; |
3066 | msg.binaryBucket = new byte[0];// binaryBucket; | 3066 | msg.binaryBucket |
3067 | = Util.StringToBytes256( | ||
3068 | "{0}/{1}/{2}/{3}", | ||
3069 | World.RegionInfo.RegionName, | ||
3070 | (int)Math.Floor(m_host.AbsolutePosition.X), | ||
3071 | (int)Math.Floor(m_host.AbsolutePosition.Y), | ||
3072 | (int)Math.Floor(m_host.AbsolutePosition.Z)); | ||
3067 | 3073 | ||
3068 | if (m_TransferModule != null) | 3074 | if (m_TransferModule != null) |
3069 | { | 3075 | { |
3070 | m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); | 3076 | m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); |
3071 | } | 3077 | } |
3078 | |||
3072 | ScriptSleep(2000); | 3079 | ScriptSleep(2000); |
3073 | } | 3080 | } |
3074 | 3081 | ||