diff options
author | Melanie | 2011-10-25 02:35:33 +0100 |
---|---|---|
committer | Melanie | 2011-10-25 02:35:33 +0100 |
commit | b7237ef059ab018ab38a2b42764251271603daf0 (patch) | |
tree | 0dfeb325870a24daa02f162764fbf65b283eedef | |
parent | Merge commit '79c13cd99728f09a5175dff1750dcb9d7790fcdc' into bigmerge (diff) | |
parent | refactor: Use SOP.SitTargetAvatar instead of calling a special GetAvatarOnSit... (diff) | |
download | opensim-SC_OLD-b7237ef059ab018ab38a2b42764251271603daf0.zip opensim-SC_OLD-b7237ef059ab018ab38a2b42764251271603daf0.tar.gz opensim-SC_OLD-b7237ef059ab018ab38a2b42764251271603daf0.tar.bz2 opensim-SC_OLD-b7237ef059ab018ab38a2b42764251271603daf0.tar.xz |
Merge commit '62a63f834b7cc056ee37c396034d0e268f66b4a8' into bigmerge
Conflicts:
OpenSim/Region/Framework/Scenes/ScenePresence.cs
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 8 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 17 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 2 |
3 files changed, 14 insertions, 13 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 89b98af..c1097e4 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -1260,6 +1260,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1260 | set { m_occupied = value; } | 1260 | set { m_occupied = value; } |
1261 | } | 1261 | } |
1262 | 1262 | ||
1263 | /// <summary> | ||
1264 | /// ID of the avatar that is sat on us. If there is no such avatar then is UUID.Zero | ||
1265 | /// </summary> | ||
1263 | public UUID SitTargetAvatar | 1266 | public UUID SitTargetAvatar |
1264 | { | 1267 | { |
1265 | get { return m_sitTargetAvatar; } | 1268 | get { return m_sitTargetAvatar; } |
@@ -1942,11 +1945,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1942 | return part; | 1945 | return part; |
1943 | } | 1946 | } |
1944 | 1947 | ||
1945 | public UUID GetAvatarOnSitTarget() | ||
1946 | { | ||
1947 | return m_sitTargetAvatar; | ||
1948 | } | ||
1949 | |||
1950 | public bool GetDieAtEdge() | 1948 | public bool GetDieAtEdge() |
1951 | { | 1949 | { |
1952 | if (m_parentGroup.IsDeleted) | 1950 | if (m_parentGroup.IsDeleted) |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index bb65322..941765d 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1994,9 +1994,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1994 | } | 1994 | } |
1995 | } | 1995 | } |
1996 | part.TaskInventory.LockItemsForRead(false); | 1996 | part.TaskInventory.LockItemsForRead(false); |
1997 | |||
1997 | // Reset sit target. | 1998 | // Reset sit target. |
1998 | if (part.GetAvatarOnSitTarget() == UUID) | 1999 | if (part.SitTargetAvatar == UUID) |
1999 | part.SitTargetAvatar = UUID.Zero; | 2000 | part.SitTargetAvatar = UUID.Zero; |
2001 | |||
2000 | part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK); | 2002 | part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK); |
2001 | 2003 | ||
2002 | ParentPosition = part.GetWorldPosition(); | 2004 | ParentPosition = part.GetWorldPosition(); |
@@ -2083,10 +2085,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
2083 | // Is a sit target available? | 2085 | // Is a sit target available? |
2084 | Vector3 avSitOffSet = part.SitTargetPosition; | 2086 | Vector3 avSitOffSet = part.SitTargetPosition; |
2085 | Quaternion avSitOrientation = part.SitTargetOrientation; | 2087 | Quaternion avSitOrientation = part.SitTargetOrientation; |
2086 | UUID avOnTargetAlready = part.GetAvatarOnSitTarget(); | 2088 | UUID avOnTargetAlready = part.SitTargetAvatar; |
2087 | bool SitTargetOccupied = (avOnTargetAlready != UUID.Zero); | 2089 | |
2090 | bool SitTargetUnOccupied = (!(avOnTargetAlready != UUID.Zero)); | ||
2088 | bool SitTargetisSet = (Vector3.Zero != avSitOffSet); //NB Latest SL Spec shows Sit Rotation setting is ignored. | 2091 | bool SitTargetisSet = (Vector3.Zero != avSitOffSet); //NB Latest SL Spec shows Sit Rotation setting is ignored. |
2089 | if (SitTargetisSet && !SitTargetOccupied) | 2092 | |
2093 | if (SitTargetisSet && SitTargetUnOccupied) | ||
2090 | { | 2094 | { |
2091 | //switch the target to this prim | 2095 | //switch the target to this prim |
2092 | return part; | 2096 | return part; |
@@ -2525,8 +2529,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2525 | { | 2529 | { |
2526 | if (part != null) | 2530 | if (part != null) |
2527 | { | 2531 | { |
2528 | //Console.WriteLine("Link #{0}, Rot {1}", part.LinkNum, part.GetWorldRotation()); | 2532 | if (part.SitTargetAvatar == UUID) |
2529 | if (part.GetAvatarOnSitTarget() == UUID) | ||
2530 | { | 2533 | { |
2531 | //Console.WriteLine("Scripted Sit"); | 2534 | //Console.WriteLine("Scripted Sit"); |
2532 | // Scripted sit | 2535 | // Scripted sit |
@@ -2607,7 +2610,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2607 | m_parentID = m_requestedSitTargetID; | 2610 | m_parentID = m_requestedSitTargetID; |
2608 | } | 2611 | } |
2609 | 2612 | ||
2610 | if (part.GetAvatarOnSitTarget() != UUID) | 2613 | if (part.SitTargetAvatar != UUID) |
2611 | { | 2614 | { |
2612 | m_offsetRotation = m_offsetRotation / part.RotationOffset; | 2615 | m_offsetRotation = m_offsetRotation / part.RotationOffset; |
2613 | } | 2616 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index eadf69c..012f7e1 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -6809,7 +6809,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6809 | public LSL_String llAvatarOnSitTarget() | 6809 | public LSL_String llAvatarOnSitTarget() |
6810 | { | 6810 | { |
6811 | m_host.AddScriptLPS(1); | 6811 | m_host.AddScriptLPS(1); |
6812 | return m_host.GetAvatarOnSitTarget().ToString(); | 6812 | return m_host.SitTargetAvatar.ToString(); |
6813 | } | 6813 | } |
6814 | 6814 | ||
6815 | // http://wiki.secondlife.com/wiki/LlAvatarOnLinkSitTarget | 6815 | // http://wiki.secondlife.com/wiki/LlAvatarOnLinkSitTarget |