aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorTeravus Ovares2008-04-22 08:15:44 +0000
committerTeravus Ovares2008-04-22 08:15:44 +0000
commit9b696a1d5c92594fb3f220b9348a739b7cce8d6d (patch)
tree3ae1bbcdb276c92c4d70bdbcd6bd66c683ded6ce
parent* Committing new terrain plugin effects system. Loads DLLs in /bin/Terrain/ a... (diff)
downloadopensim-SC_OLD-9b696a1d5c92594fb3f220b9348a739b7cce8d6d.zip
opensim-SC_OLD-9b696a1d5c92594fb3f220b9348a739b7cce8d6d.tar.gz
opensim-SC_OLD-9b696a1d5c92594fb3f220b9348a739b7cce8d6d.tar.bz2
opensim-SC_OLD-9b696a1d5c92594fb3f220b9348a739b7cce8d6d.tar.xz
* Patch from Mic Bowman(cmickeyb) that implements llUnsit. Thanks Mic!
* I expanded upon his patch just a bit to incorporate the following. * if the avatar is sitting on this object, then we can unsit them. * If the object owner also owns the parcel or if the land is group owned and the object is group owned by the same group or if the object is owned by a person with estate access, then we can unsit them.
Diffstat (limited to '')
-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)