aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs39
1 files changed, 38 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 04f8967..fb436c7 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -3284,7 +3284,44 @@ namespace OpenSim.Region.ScriptEngine.Common
3284 public void llUnSit(string id) 3284 public void llUnSit(string id)
3285 { 3285 {
3286 m_host.AddScriptLPS(1); 3286 m_host.AddScriptLPS(1);
3287 NotImplemented("llUnSit"); 3287
3288 LLUUID key = new LLUUID();
3289 if (LLUUID.TryParse(id, out key))
3290 {
3291
3292 ScenePresence av = World.GetScenePresence(key);
3293 if (av != null)
3294 {
3295 if (llAvatarOnSitTarget() == id)
3296 {
3297 // if the avatar is sitting on this object, then
3298 // we can unsit them. We don't want random scripts unsitting random people
3299 // Lets avoid the popcorn avatar scenario.
3300 av.StandUp();
3301 }
3302 else
3303 {
3304 // If the object owner also owns the parcel
3305 // or
3306 // if the land is group owned and the object is group owned by the same group
3307 // or
3308 // if the object is owned by a person with estate access.
3309
3310 ILandObject parcel = World.LandChannel.getLandObject(av.AbsolutePosition.X, av.AbsolutePosition.Y);
3311 if (parcel != null)
3312 {
3313 if (m_host.ObjectOwner == parcel.landData.ownerID ||
3314 (m_host.OwnerID == m_host.GroupID && m_host.GroupID == parcel.landData.groupID
3315 && parcel.landData.isGroupOwned) || World.PermissionsMngr.GenericEstatePermission(m_host.OwnerID))
3316 {
3317 av.StandUp();
3318 }
3319 }
3320 }
3321 }
3322
3323 }
3324
3288 } 3325 }
3289 3326
3290 public LSL_Types.Vector3 llGroundSlope(LSL_Types.Vector3 offset) 3327 public LSL_Types.Vector3 llGroundSlope(LSL_Types.Vector3 offset)