diff options
Diffstat (limited to '')
-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 | ||