diff options
author | Melanie Thielker | 2014-06-21 00:39:55 +0200 |
---|---|---|
committer | Melanie Thielker | 2014-06-21 00:39:55 +0200 |
commit | 159fcbf150b7da0e229b29aa7b94793484543d12 (patch) | |
tree | b8c0ff3b4c758a3fba8315b556c923ef4c02a185 /OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |
parent | Merge commit '68c8633ba18f0a11cfc0ed04d1d0c7c59e6cec76' (diff) | |
parent | Merge branch 'master' into careminster (diff) | |
download | opensim-SC_OLD-159fcbf150b7da0e229b29aa7b94793484543d12.zip opensim-SC_OLD-159fcbf150b7da0e229b29aa7b94793484543d12.tar.gz opensim-SC_OLD-159fcbf150b7da0e229b29aa7b94793484543d12.tar.bz2 opensim-SC_OLD-159fcbf150b7da0e229b29aa7b94793484543d12.tar.xz |
Merge branch 'master' of ssh://3dhosting.de/var/git/careminster
Conflicts:
OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 86f60bb..cfa862e 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -111,6 +111,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
111 | STATUS_ROTATE_Z = 0x008, | 111 | STATUS_ROTATE_Z = 0x008, |
112 | } | 112 | } |
113 | 113 | ||
114 | // This flag has the same purpose as InventoryItemFlags.ObjectSlamPerm | ||
115 | public static readonly uint SLAM = 16; | ||
116 | |||
114 | // private PrimCountTaintedDelegate handlerPrimCountTainted = null; | 117 | // private PrimCountTaintedDelegate handlerPrimCountTainted = null; |
115 | 118 | ||
116 | /// <summary> | 119 | /// <summary> |
@@ -506,9 +509,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
506 | { | 509 | { |
507 | return (IsAttachment || (m_rootPart.Shape.PCode == 9 && m_rootPart.Shape.State != 0)); | 510 | return (IsAttachment || (m_rootPart.Shape.PCode == 9 && m_rootPart.Shape.State != 0)); |
508 | } | 511 | } |
509 | 512 | ||
510 | |||
511 | |||
512 | private struct avtocrossInfo | 513 | private struct avtocrossInfo |
513 | { | 514 | { |
514 | public ScenePresence av; | 515 | public ScenePresence av; |
@@ -660,12 +661,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
660 | } | 661 | } |
661 | } | 662 | } |
662 | 663 | ||
663 | /* don't see the need but worse don't see where is restored to false if things stay in | ||
664 | foreach (SceneObjectPart part in m_parts.GetArray()) | ||
665 | { | ||
666 | part.IgnoreUndoUpdate = true; | ||
667 | } | ||
668 | */ | ||
669 | if (RootPart.GetStatusSandbox()) | 664 | if (RootPart.GetStatusSandbox()) |
670 | { | 665 | { |
671 | if (Util.GetDistanceTo(RootPart.StatusSandboxPos, value) > 10) | 666 | if (Util.GetDistanceTo(RootPart.StatusSandboxPos, value) > 10) |
@@ -751,7 +746,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
751 | } | 746 | } |
752 | 747 | ||
753 | agent.ParentUUID = UUID.Zero; | 748 | agent.ParentUUID = UUID.Zero; |
754 | |||
755 | // agent.Reset(); | 749 | // agent.Reset(); |
756 | // else // Not successful | 750 | // else // Not successful |
757 | // agent.RestoreInCurrentScene(); | 751 | // agent.RestoreInCurrentScene(); |
@@ -1667,7 +1661,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1667 | ScenePresence avatar = m_scene.GetScenePresence(AttachedAvatar); | 1661 | ScenePresence avatar = m_scene.GetScenePresence(AttachedAvatar); |
1668 | if (avatar == null) | 1662 | if (avatar == null) |
1669 | return; | 1663 | return; |
1670 | 1664 | m_rootPart.Shape.LastAttachPoint = m_rootPart.Shape.State; | |
1665 | m_rootPart.AttachedPos = m_rootPart.OffsetPosition; | ||
1671 | avatar.RemoveAttachment(this); | 1666 | avatar.RemoveAttachment(this); |
1672 | 1667 | ||
1673 | Vector3 detachedpos = new Vector3(127f,127f,127f); | 1668 | Vector3 detachedpos = new Vector3(127f,127f,127f); |
@@ -1868,11 +1863,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1868 | /// <summary> | 1863 | /// <summary> |
1869 | /// Delete this group from its scene. | 1864 | /// Delete this group from its scene. |
1870 | /// </summary> | 1865 | /// </summary> |
1871 | /// | 1866 | /// <remarks> |
1872 | /// This only handles the in-world consequences of deletion (e.g. any avatars sitting on it are forcibly stood | 1867 | /// This only handles the in-world consequences of deletion (e.g. any avatars sitting on it are forcibly stood |
1873 | /// up and all avatars receive notification of its removal. Removal of the scene object from database backup | 1868 | /// up and all avatars receive notification of its removal. Removal of the scene object from database backup |
1874 | /// must be handled by the caller. | 1869 | /// must be handled by the caller. |
1875 | /// | 1870 | /// </remarks> |
1876 | /// <param name="silent">If true then deletion is not broadcast to clients</param> | 1871 | /// <param name="silent">If true then deletion is not broadcast to clients</param> |
1877 | public void DeleteGroupFromScene(bool silent) | 1872 | public void DeleteGroupFromScene(bool silent) |
1878 | { | 1873 | { |
@@ -1901,7 +1896,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1901 | if (!IsAttachment | 1896 | if (!IsAttachment |
1902 | || AttachedAvatar == avatar.ControllingClient.AgentId | 1897 | || AttachedAvatar == avatar.ControllingClient.AgentId |
1903 | || !HasPrivateAttachmentPoint) | 1898 | || !HasPrivateAttachmentPoint) |
1904 | avatar.ControllingClient.SendKillObject(m_regionHandle, new List<uint> { part.LocalId }); | 1899 | avatar.ControllingClient.SendKillObject(new List<uint> { part.LocalId }); |
1905 | } | 1900 | } |
1906 | } | 1901 | } |
1907 | }); | 1902 | }); |
@@ -2109,6 +2104,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2109 | 2104 | ||
2110 | if (RootPart.Shape.PCode == 9 && RootPart.Shape.State != 0) | 2105 | if (RootPart.Shape.PCode == 9 && RootPart.Shape.State != 0) |
2111 | { | 2106 | { |
2107 | RootPart.Shape.LastAttachPoint = RootPart.Shape.State; | ||
2112 | RootPart.Shape.State = 0; | 2108 | RootPart.Shape.State = 0; |
2113 | ScheduleGroupForFullUpdate(); | 2109 | ScheduleGroupForFullUpdate(); |
2114 | } | 2110 | } |
@@ -2210,7 +2206,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2210 | if (!userExposed) | 2206 | if (!userExposed) |
2211 | dupe.IsAttachment = true; | 2207 | dupe.IsAttachment = true; |
2212 | 2208 | ||
2213 | dupe.AbsolutePosition = new Vector3(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z); | 2209 | dupe.m_sittingAvatars = new List<UUID>(); |
2214 | 2210 | ||
2215 | if (!userExposed) | 2211 | if (!userExposed) |
2216 | { | 2212 | { |
@@ -3813,20 +3809,20 @@ namespace OpenSim.Region.Framework.Scenes | |||
3813 | /// <summary> | 3809 | /// <summary> |
3814 | /// Update just the root prim position in a linkset | 3810 | /// Update just the root prim position in a linkset |
3815 | /// </summary> | 3811 | /// </summary> |
3816 | /// <param name="pos"></param> | 3812 | /// <param name="newPos"></param> |
3817 | public void UpdateRootPosition(Vector3 pos) | 3813 | public void UpdateRootPosition(Vector3 newPos) |
3818 | { | 3814 | { |
3819 | // needs to be called with phys building true | 3815 | // needs to be called with phys building true |
3820 | Vector3 newPos = new Vector3(pos.X, pos.Y, pos.Z); | 3816 | Vector3 oldPos; |
3821 | Vector3 oldPos = | 3817 | |
3822 | new Vector3(AbsolutePosition.X + m_rootPart.OffsetPosition.X, | 3818 | if (IsAttachment) |
3823 | AbsolutePosition.Y + m_rootPart.OffsetPosition.Y, | 3819 | oldPos = m_rootPart.AttachedPos + m_rootPart.OffsetPosition; // OffsetPosition should always be 0 in an attachments's root prim |
3824 | AbsolutePosition.Z + m_rootPart.OffsetPosition.Z); | 3820 | else |
3821 | oldPos = AbsolutePosition + m_rootPart.OffsetPosition; | ||
3822 | |||
3825 | Vector3 diff = oldPos - newPos; | 3823 | Vector3 diff = oldPos - newPos; |
3826 | Vector3 axDiff = new Vector3(diff.X, diff.Y, diff.Z); | ||
3827 | Quaternion partRotation = m_rootPart.RotationOffset; | 3824 | Quaternion partRotation = m_rootPart.RotationOffset; |
3828 | axDiff *= Quaternion.Inverse(partRotation); | 3825 | diff *= Quaternion.Inverse(partRotation); |
3829 | diff = axDiff; | ||
3830 | 3826 | ||
3831 | SceneObjectPart[] parts = m_parts.GetArray(); | 3827 | SceneObjectPart[] parts = m_parts.GetArray(); |
3832 | for (int i = 0; i < parts.Length; i++) | 3828 | for (int i = 0; i < parts.Length; i++) |
@@ -3837,6 +3833,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3837 | } | 3833 | } |
3838 | 3834 | ||
3839 | AbsolutePosition = newPos; | 3835 | AbsolutePosition = newPos; |
3836 | |||
3837 | if (IsAttachment) | ||
3838 | m_rootPart.AttachedPos = newPos; | ||
3840 | 3839 | ||
3841 | HasGroupChanged = true; | 3840 | HasGroupChanged = true; |
3842 | if (m_rootPart.Undoing) | 3841 | if (m_rootPart.Undoing) |