aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs21
1 files changed, 10 insertions, 11 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 17e8253..a8f87b7 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4151,26 +4151,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4151 4151
4152 public LSL_Types.LSLInteger llOverMyLand(string id) 4152 public LSL_Types.LSLInteger llOverMyLand(string id)
4153 { 4153 {
4154
4155 m_host.AddScriptLPS(1); 4154 m_host.AddScriptLPS(1);
4156 LLUUID key = new LLUUID(); 4155 LLUUID key = new LLUUID();
4157 if (LLUUID.TryParse(id,out key)) 4156 if (LLUUID.TryParse(id,out key))
4158 { 4157 {
4159 SceneObjectPart obj = new SceneObjectPart(); 4158 ScenePresence presence = World.GetScenePresence(key);
4160 obj = World.GetSceneObjectPart(World.Entities[key].LocalId); 4159 if (presence != null) // object is an avatar
4161 if (obj.OwnerID == World.GetLandOwner(obj.AbsolutePosition.X, obj.AbsolutePosition.Y))
4162 { 4160 {
4163 return 1; 4161 if (m_host.OwnerID == World.GetLandOwner(presence.AbsolutePosition.X, presence.AbsolutePosition.Y))
4162 return 1;
4164 } 4163 }
4165 else 4164 else // object is not an avatar
4166 { 4165 {
4167 return 0; 4166 SceneObjectPart obj = World.GetSceneObjectPart(key);
4167 if (obj != null)
4168 if (m_host.OwnerID == World.GetLandOwner(obj.AbsolutePosition.X, obj.AbsolutePosition.Y))
4169 return 1;
4168 } 4170 }
4169 } 4171 }
4170 else 4172 return 0;
4171 {
4172 return 0;
4173 }
4174 } 4173 }
4175 4174
4176 public string llGetLandOwnerAt(LSL_Types.Vector3 pos) 4175 public string llGetLandOwnerAt(LSL_Types.Vector3 pos)