diff options
author | alondria | 2008-03-21 15:34:51 +0000 |
---|---|---|
committer | alondria | 2008-03-21 15:34:51 +0000 |
commit | 5c41051fda0a48086ed5349985e60f98e0a306e4 (patch) | |
tree | d1b3a0ddb4a9e89d5ab9ebd8801c7d4d764d0e26 /OpenSim/Region | |
parent | * Updated ray tracing code. It's now good enough to use when the XYZ vector... (diff) | |
download | opensim-SC_OLD-5c41051fda0a48086ed5349985e60f98e0a306e4.zip opensim-SC_OLD-5c41051fda0a48086ed5349985e60f98e0a306e4.tar.gz opensim-SC_OLD-5c41051fda0a48086ed5349985e60f98e0a306e4.tar.bz2 opensim-SC_OLD-5c41051fda0a48086ed5349985e60f98e0a306e4.tar.xz |
Implemented llOverMyLand() and correct llGetOwnerKey() to properly return the information for the argument key, opposed to the object the script is in.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 32 |
1 files changed, 28 insertions, 4 deletions
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 | |||
2058 | public string llGetOwnerKey(string id) | 2058 | public string llGetOwnerKey(string id) |
2059 | { | 2059 | { |
2060 | m_host.AddScriptLPS(1); | 2060 | m_host.AddScriptLPS(1); |
2061 | 2061 | LLUUID key = new LLUUID(); | |
2062 | return m_host.OwnerID.ToString(); | 2062 | if (LLUUID.TryParse(id, out key)) |
2063 | { | ||
2064 | return World.GetSceneObjectPart(World.Entities[key].LocalId).OwnerID.ToString(); | ||
2065 | } | ||
2066 | else | ||
2067 | { | ||
2068 | return LLUUID.Zero.ToString(); | ||
2069 | } | ||
2063 | } | 2070 | } |
2064 | 2071 | ||
2065 | public LSL_Types.Vector3 llGetCenterOfMass() | 2072 | public LSL_Types.Vector3 llGetCenterOfMass() |
@@ -2715,9 +2722,26 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2715 | 2722 | ||
2716 | public int llOverMyLand(string id) | 2723 | public int llOverMyLand(string id) |
2717 | { | 2724 | { |
2725 | |||
2718 | m_host.AddScriptLPS(1); | 2726 | m_host.AddScriptLPS(1); |
2719 | NotImplemented("llOverMyLand"); | 2727 | LLUUID key = new LLUUID(); |
2720 | return 0; | 2728 | if (LLUUID.TryParse(id,out key)) |
2729 | { | ||
2730 | SceneObjectPart obj = new SceneObjectPart(); | ||
2731 | obj = World.GetSceneObjectPart(World.Entities[key].LocalId); | ||
2732 | if (obj.OwnerID == World.GetLandOwner(obj.AbsolutePosition.X, obj.AbsolutePosition.Y)) | ||
2733 | { | ||
2734 | return 1; | ||
2735 | } | ||
2736 | else | ||
2737 | { | ||
2738 | return 0; | ||
2739 | } | ||
2740 | } | ||
2741 | else | ||
2742 | { | ||
2743 | return 0; | ||
2744 | } | ||
2721 | } | 2745 | } |
2722 | 2746 | ||
2723 | public string llGetLandOwnerAt(LSL_Types.Vector3 pos) | 2747 | public string llGetLandOwnerAt(LSL_Types.Vector3 pos) |