Mantis#1925. Thank you, homerHorwitz for a patch that:
This fixes the coordinates returned by doing a llRequestInventoryData on a landmark.0.6.0-stable
parent
4f8f89a215
commit
6ccb9948ab
|
@ -2986,7 +2986,36 @@ namespace OpenSim.Region.ScriptEngine.Common
|
|||
public string llRequestInventoryData(string name)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
NotImplemented("llRequestInventoryData");
|
||||
foreach (TaskInventoryItem item in m_host.TaskInventory.Values)
|
||||
{
|
||||
if (item.Type == 3 && item.Name == name)
|
||||
{
|
||||
LLUUID tid = m_ScriptEngine.m_ASYNCLSLCommandManager.m_Dataserver.RegisterRequest(
|
||||
m_localID, m_itemID, item.AssetID.ToString());
|
||||
|
||||
LLVector3 region = new LLVector3(
|
||||
World.RegionInfo.RegionLocX * Constants.RegionSize,
|
||||
World.RegionInfo.RegionLocY * Constants.RegionSize,
|
||||
0);
|
||||
|
||||
World.AssetCache.GetAsset(item.AssetID,
|
||||
delegate(LLUUID i, AssetBase a)
|
||||
{
|
||||
AssetLandmark lm = new AssetLandmark(a);
|
||||
|
||||
float rx = (uint)(lm.RegionHandle >> 32);
|
||||
float ry = (uint)lm.RegionHandle;
|
||||
region = lm.Position + new LLVector3(rx, ry, 0) - region;
|
||||
|
||||
string reply = region.ToString();
|
||||
m_ScriptEngine.m_ASYNCLSLCommandManager.
|
||||
m_Dataserver.DataserverReply(i.ToString(),
|
||||
reply);
|
||||
}, false);
|
||||
|
||||
return tid.ToString();
|
||||
}
|
||||
}
|
||||
return String.Empty;
|
||||
}
|
||||
|
||||
|
|
|
@ -2917,10 +2917,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
{
|
||||
AssetLandmark lm = new AssetLandmark(a);
|
||||
|
||||
region += lm.Position;
|
||||
float rx = (uint)(lm.RegionHandle >> 32);
|
||||
float ry = (uint)lm.RegionHandle;
|
||||
region = lm.Position + new LLVector3(rx, ry, 0) - region;
|
||||
|
||||
string reply = region.ToString();
|
||||
|
||||
AsyncCommands.
|
||||
DataserverPlugin.DataserverReply(i.ToString(),
|
||||
reply);
|
||||
|
|
Loading…
Reference in New Issue