Implemented llOverMyLand() and correct llGetOwnerKey() to properly return the information for the argument key, opposed to the object the script is in.
parent
0cb05c1952
commit
5c41051fda
|
@ -2058,8 +2058,15 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||||
public string llGetOwnerKey(string id)
|
public string llGetOwnerKey(string id)
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
|
LLUUID key = new LLUUID();
|
||||||
return m_host.OwnerID.ToString();
|
if (LLUUID.TryParse(id, out key))
|
||||||
|
{
|
||||||
|
return World.GetSceneObjectPart(World.Entities[key].LocalId).OwnerID.ToString();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return LLUUID.Zero.ToString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public LSL_Types.Vector3 llGetCenterOfMass()
|
public LSL_Types.Vector3 llGetCenterOfMass()
|
||||||
|
@ -2715,9 +2722,26 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||||
|
|
||||||
public int llOverMyLand(string id)
|
public int llOverMyLand(string id)
|
||||||
{
|
{
|
||||||
|
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
NotImplemented("llOverMyLand");
|
LLUUID key = new LLUUID();
|
||||||
return 0;
|
if (LLUUID.TryParse(id,out key))
|
||||||
|
{
|
||||||
|
SceneObjectPart obj = new SceneObjectPart();
|
||||||
|
obj = World.GetSceneObjectPart(World.Entities[key].LocalId);
|
||||||
|
if (obj.OwnerID == World.GetLandOwner(obj.AbsolutePosition.X, obj.AbsolutePosition.Y))
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string llGetLandOwnerAt(LSL_Types.Vector3 pos)
|
public string llGetLandOwnerAt(LSL_Types.Vector3 pos)
|
||||||
|
|
Loading…
Reference in New Issue