diff options
author | Charles Krinke | 2008-08-13 14:06:21 +0000 |
---|---|---|
committer | Charles Krinke | 2008-08-13 14:06:21 +0000 |
commit | 6ccb9948ab9df1004862f997150edc5869ddbbbf (patch) | |
tree | bde66d27edd49c4a80528e5b0f52e82a2435c56f /OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |
parent | Remove the (experimental) suffix from the XEngine line in the sample (diff) | |
download | opensim-SC_OLD-6ccb9948ab9df1004862f997150edc5869ddbbbf.zip opensim-SC_OLD-6ccb9948ab9df1004862f997150edc5869ddbbbf.tar.gz opensim-SC_OLD-6ccb9948ab9df1004862f997150edc5869ddbbbf.tar.bz2 opensim-SC_OLD-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.cs | 31 |
1 files changed, 30 insertions, 1 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 | ||