From 87d55443d3fd3cc86dce0b8efe05a8c304f7d6c8 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Thu, 27 Dec 2007 03:25:00 +0000 Subject: * Added slightly better object sit handling * Added sit handling for sit targets * Implemented llSitTarget() * Implemented llAvatarOnSitTarget() * Sit targets do not persist sim restart. --- .../Region/Environment/Scenes/SceneObjectPart.cs | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectPart.cs') diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 34705db..bcd31c2 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -68,6 +68,11 @@ namespace OpenSim.Region.Environment.Scenes public Int32 CreationDate; public uint ParentID = 0; + private Vector3 m_sitTargetPosition = new Vector3(0, 0, 0); + private Quaternion m_sitTargetOrientation = new Quaternion(0, 0, 0, 1); + private LLUUID m_SitTargetAvatar = LLUUID.Zero; + + // Main grid has default permissions as follows // public uint OwnerMask = FULL_MASK_PERMISSIONS_OWNER; @@ -161,6 +166,8 @@ namespace OpenSim.Region.Environment.Scenes //unkown if this will be kept, added as a way of removing the group position from the group class protected LLVector3 m_groupPosition; + + public LLVector3 GroupPosition { get @@ -774,6 +781,33 @@ namespace OpenSim.Region.Environment.Scenes m_parentGroup = parent; } + public void SetSitTarget(Vector3 offset, Quaternion orientation) + { + m_sitTargetPosition = offset; + m_sitTargetOrientation = orientation; + } + + public Vector3 GetSitTargetPosition() + { + return m_sitTargetPosition; + } + + public Quaternion GetSitTargetOrientation() + { + return m_sitTargetOrientation; + } + + public void SetAvatarOnSitTarget(LLUUID avatarID) + { + m_SitTargetAvatar = avatarID; + } + + public LLUUID GetAvatarOnSitTarget() + { + return m_SitTargetAvatar; + } + + public LLUUID GetRootPartUUID() { if (m_parentGroup != null) -- cgit v1.1