From 5c41051fda0a48086ed5349985e60f98e0a306e4 Mon Sep 17 00:00:00 2001 From: alondria Date: Fri, 21 Mar 2008 15:34:51 +0000 Subject: Implemented llOverMyLand() and correct llGetOwnerKey() to properly return the information for the argument key, opposed to the object the script is in. --- .../ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 32 +++++++++++++++++++--- 1 file changed, 28 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index a3f546d..7903b52 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -2058,8 +2058,15 @@ namespace OpenSim.Region.ScriptEngine.Common public string llGetOwnerKey(string id) { m_host.AddScriptLPS(1); - - return m_host.OwnerID.ToString(); + LLUUID key = new LLUUID(); + 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() @@ -2715,9 +2722,26 @@ namespace OpenSim.Region.ScriptEngine.Common public int llOverMyLand(string id) { + m_host.AddScriptLPS(1); - NotImplemented("llOverMyLand"); - return 0; + LLUUID key = new LLUUID(); + 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) -- cgit v1.1