aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorCharles Krinke2008-08-13 14:06:21 +0000
committerCharles Krinke2008-08-13 14:06:21 +0000
commit6ccb9948ab9df1004862f997150edc5869ddbbbf (patch)
treebde66d27edd49c4a80528e5b0f52e82a2435c56f
parentRemove the (experimental) suffix from the XEngine line in the sample (diff)
downloadopensim-SC-6ccb9948ab9df1004862f997150edc5869ddbbbf.zip
opensim-SC-6ccb9948ab9df1004862f997150edc5869ddbbbf.tar.gz
opensim-SC-6ccb9948ab9df1004862f997150edc5869ddbbbf.tar.bz2
opensim-SC-6ccb9948ab9df1004862f997150edc5869ddbbbf.tar.xz
Mantis#1925. Thank you, homerHorwitz for a patch that:
This fixes the coordinates returned by doing a llRequestInventoryData on a landmark.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs31
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs5
2 files changed, 33 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index d2a15aa..41703cd 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -2986,7 +2986,36 @@ namespace OpenSim.Region.ScriptEngine.Common
2986 public string llRequestInventoryData(string name) 2986 public string llRequestInventoryData(string name)
2987 { 2987 {
2988 m_host.AddScriptLPS(1); 2988 m_host.AddScriptLPS(1);
2989 NotImplemented("llRequestInventoryData"); 2989 foreach (TaskInventoryItem item in m_host.TaskInventory.Values)
2990 {
2991 if (item.Type == 3 && item.Name == name)
2992 {
2993 LLUUID tid = m_ScriptEngine.m_ASYNCLSLCommandManager.m_Dataserver.RegisterRequest(
2994 m_localID, m_itemID, item.AssetID.ToString());
2995
2996 LLVector3 region = new LLVector3(
2997 World.RegionInfo.RegionLocX * Constants.RegionSize,
2998 World.RegionInfo.RegionLocY * Constants.RegionSize,
2999 0);
3000
3001 World.AssetCache.GetAsset(item.AssetID,
3002 delegate(LLUUID i, AssetBase a)
3003 {
3004 AssetLandmark lm = new AssetLandmark(a);
3005
3006 float rx = (uint)(lm.RegionHandle >> 32);
3007 float ry = (uint)lm.RegionHandle;
3008 region = lm.Position + new LLVector3(rx, ry, 0) - region;
3009
3010 string reply = region.ToString();
3011 m_ScriptEngine.m_ASYNCLSLCommandManager.
3012 m_Dataserver.DataserverReply(i.ToString(),
3013 reply);
3014 }, false);
3015
3016 return tid.ToString();
3017 }
3018 }
2990 return String.Empty; 3019 return String.Empty;
2991 } 3020 }
2992 3021
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index d7633d8..17e8253 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2917,10 +2917,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2917 { 2917 {
2918 AssetLandmark lm = new AssetLandmark(a); 2918 AssetLandmark lm = new AssetLandmark(a);
2919 2919
2920 region += lm.Position; 2920 float rx = (uint)(lm.RegionHandle >> 32);
2921 float ry = (uint)lm.RegionHandle;
2922 region = lm.Position + new LLVector3(rx, ry, 0) - region;
2921 2923
2922 string reply = region.ToString(); 2924 string reply = region.ToString();
2923
2924 AsyncCommands. 2925 AsyncCommands.
2925 DataserverPlugin.DataserverReply(i.ToString(), 2926 DataserverPlugin.DataserverReply(i.ToString(),
2926 reply); 2927 reply);