aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs21
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs21
2 files changed, 20 insertions, 22 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 41703cd..cef9cbf 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -4241,26 +4241,25 @@ namespace OpenSim.Region.ScriptEngine.Common
4241 4241
4242 public LSL_Types.LSLInteger llOverMyLand(string id) 4242 public LSL_Types.LSLInteger llOverMyLand(string id)
4243 { 4243 {
4244
4245 m_host.AddScriptLPS(1); 4244 m_host.AddScriptLPS(1);
4246 LLUUID key = new LLUUID(); 4245 LLUUID key = new LLUUID();
4247 if (LLUUID.TryParse(id,out key)) 4246 if (LLUUID.TryParse(id,out key))
4248 { 4247 {
4249 SceneObjectPart obj = new SceneObjectPart(); 4248 ScenePresence presence = World.GetScenePresence(key);
4250 obj = World.GetSceneObjectPart(World.Entities[key].LocalId); 4249 if (presence != null) // object is an avatar
4251 if (obj.OwnerID == World.GetLandOwner(obj.AbsolutePosition.X, obj.AbsolutePosition.Y))
4252 { 4250 {
4253 return 1; 4251 if (m_host.OwnerID == World.GetLandOwner(presence.AbsolutePosition.X, presence.AbsolutePosition.Y))
4252 return 1;
4254 } 4253 }
4255 else 4254 else // object is not an avatar
4256 { 4255 {
4257 return 0; 4256 SceneObjectPart obj = World.GetSceneObjectPart(key);
4257 if (obj != null)
4258 if (m_host.OwnerID == World.GetLandOwner(obj.AbsolutePosition.X, obj.AbsolutePosition.Y))
4259 return 1;
4258 } 4260 }
4259 } 4261 }
4260 else 4262 return 0;
4261 {
4262 return 0;
4263 }
4264 } 4263 }
4265 4264
4266 public string llGetLandOwnerAt(LSL_Types.Vector3 pos) 4265 public string llGetLandOwnerAt(LSL_Types.Vector3 pos)
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)