diff options
author | Mic Bowman | 2011-08-29 09:55:34 -0700 |
---|---|---|
committer | Mic Bowman | 2011-08-29 09:55:34 -0700 |
commit | 648866b59761cfbd76e2bd267011c935812770d0 (patch) | |
tree | 4ff1227fb7fbe684b42deabd07de5831ae6497da /OpenSim/Region/Framework/Scenes | |
parent | BulletSim: add mesh representation. Use meshes for static objects and switch ... (diff) | |
parent | Move GetMeshKey from buried inside Meshmerizer to a public method on Primitiv... (diff) | |
download | opensim-SC-648866b59761cfbd76e2bd267011c935812770d0.zip opensim-SC-648866b59761cfbd76e2bd267011c935812770d0.tar.gz opensim-SC-648866b59761cfbd76e2bd267011c935812770d0.tar.bz2 opensim-SC-648866b59761cfbd76e2bd267011c935812770d0.tar.xz |
Merge branch 'master' into bulletsim
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Prioritizer.cs | 8 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 8 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 14 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 70 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 46 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 33 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneViewer.cs | 3 |
9 files changed, 95 insertions, 93 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Prioritizer.cs b/OpenSim/Region/Framework/Scenes/Prioritizer.cs index 2a76755..33407ec 100644 --- a/OpenSim/Region/Framework/Scenes/Prioritizer.cs +++ b/OpenSim/Region/Framework/Scenes/Prioritizer.cs | |||
@@ -122,7 +122,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
122 | if (entity is SceneObjectPart) | 122 | if (entity is SceneObjectPart) |
123 | { | 123 | { |
124 | SceneObjectPart sop = (SceneObjectPart)entity; | 124 | SceneObjectPart sop = (SceneObjectPart)entity; |
125 | if (sop.ParentGroup.RootPart.IsAttachment && client.AgentId == sop.ParentGroup.AttachedAvatar) | 125 | if (sop.ParentGroup.IsAttachment && client.AgentId == sop.ParentGroup.AttachedAvatar) |
126 | return 1; | 126 | return 1; |
127 | } | 127 | } |
128 | 128 | ||
@@ -135,7 +135,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
135 | if (entity is SceneObjectPart) | 135 | if (entity is SceneObjectPart) |
136 | { | 136 | { |
137 | SceneObjectPart sop = (SceneObjectPart)entity; | 137 | SceneObjectPart sop = (SceneObjectPart)entity; |
138 | if (sop.ParentGroup.RootPart.IsAttachment && client.AgentId == sop.ParentGroup.AttachedAvatar) | 138 | if (sop.ParentGroup.IsAttachment && client.AgentId == sop.ParentGroup.AttachedAvatar) |
139 | return 1; | 139 | return 1; |
140 | } | 140 | } |
141 | 141 | ||
@@ -148,7 +148,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
148 | if (entity is SceneObjectPart) | 148 | if (entity is SceneObjectPart) |
149 | { | 149 | { |
150 | SceneObjectPart sop = (SceneObjectPart)entity; | 150 | SceneObjectPart sop = (SceneObjectPart)entity; |
151 | if (sop.ParentGroup.RootPart.IsAttachment && client.AgentId == sop.ParentGroup.AttachedAvatar) | 151 | if (sop.ParentGroup.IsAttachment && client.AgentId == sop.ParentGroup.AttachedAvatar) |
152 | return 1; | 152 | return 1; |
153 | } | 153 | } |
154 | 154 | ||
@@ -171,7 +171,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
171 | if (entity is SceneObjectPart) | 171 | if (entity is SceneObjectPart) |
172 | { | 172 | { |
173 | // Attachments are high priority, | 173 | // Attachments are high priority, |
174 | if (((SceneObjectPart)entity).ParentGroup.RootPart.IsAttachment) | 174 | if (((SceneObjectPart)entity).ParentGroup.IsAttachment) |
175 | return 1; | 175 | return 1; |
176 | 176 | ||
177 | // Non physical prims are lower priority than physical prims | 177 | // Non physical prims are lower priority than physical prims |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 9358e7b..addc20c 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -223,6 +223,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
223 | 223 | ||
224 | // Retrieve group | 224 | // Retrieve group |
225 | SceneObjectPart part = GetSceneObjectPart(primId); | 225 | SceneObjectPart part = GetSceneObjectPart(primId); |
226 | if (part == null) | ||
227 | return new ArrayList(); | ||
226 | SceneObjectGroup group = part.ParentGroup; | 228 | SceneObjectGroup group = part.ParentGroup; |
227 | if (null == group) | 229 | if (null == group) |
228 | { | 230 | { |
@@ -967,6 +969,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
967 | public void RemoveTaskInventory(IClientAPI remoteClient, UUID itemID, uint localID) | 969 | public void RemoveTaskInventory(IClientAPI remoteClient, UUID itemID, uint localID) |
968 | { | 970 | { |
969 | SceneObjectPart part = GetSceneObjectPart(localID); | 971 | SceneObjectPart part = GetSceneObjectPart(localID); |
972 | if (part == null) | ||
973 | return; | ||
970 | SceneObjectGroup group = part.ParentGroup; | 974 | SceneObjectGroup group = part.ParentGroup; |
971 | if (group != null) | 975 | if (group != null) |
972 | { | 976 | { |
@@ -2028,6 +2032,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2028 | foreach (uint localID in localIDs) | 2032 | foreach (uint localID in localIDs) |
2029 | { | 2033 | { |
2030 | SceneObjectPart part = GetSceneObjectPart(localID); | 2034 | SceneObjectPart part = GetSceneObjectPart(localID); |
2035 | if (part == null) | ||
2036 | continue; | ||
2031 | if (!groups.Contains(part.ParentGroup)) | 2037 | if (!groups.Contains(part.ParentGroup)) |
2032 | groups.Add(part.ParentGroup); | 2038 | groups.Add(part.ParentGroup); |
2033 | } | 2039 | } |
@@ -2073,6 +2079,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2073 | foreach (uint localID in localIDs) | 2079 | foreach (uint localID in localIDs) |
2074 | { | 2080 | { |
2075 | SceneObjectPart part = GetSceneObjectPart(localID); | 2081 | SceneObjectPart part = GetSceneObjectPart(localID); |
2082 | if (part == null) | ||
2083 | continue; | ||
2076 | part.GetProperties(remoteClient); | 2084 | part.GetProperties(remoteClient); |
2077 | } | 2085 | } |
2078 | } | 2086 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 513c0ea..45d1a0e 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -4223,7 +4223,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4223 | // their scripts will actually run. | 4223 | // their scripts will actually run. |
4224 | // -- Leaf, Tue Aug 12 14:17:05 EDT 2008 | 4224 | // -- Leaf, Tue Aug 12 14:17:05 EDT 2008 |
4225 | SceneObjectPart parent = part.ParentGroup.RootPart; | 4225 | SceneObjectPart parent = part.ParentGroup.RootPart; |
4226 | if (parent != null && parent.IsAttachment) | 4226 | if (parent != null && part.ParentGroup.IsAttachment) |
4227 | return ScriptDanger(parent, parent.GetWorldPosition()); | 4227 | return ScriptDanger(parent, parent.GetWorldPosition()); |
4228 | else | 4228 | else |
4229 | return ScriptDanger(part, part.GetWorldPosition()); | 4229 | return ScriptDanger(part, part.GetWorldPosition()); |
@@ -5030,7 +5030,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5030 | delete = true; | 5030 | delete = true; |
5031 | } | 5031 | } |
5032 | 5032 | ||
5033 | if (delete && !rootPart.IsAttachment && !deletes.Contains(g)) | 5033 | if (delete && !g.IsAttachment && !deletes.Contains(g)) |
5034 | deletes.Add(g); | 5034 | deletes.Add(g); |
5035 | }); | 5035 | }); |
5036 | break; | 5036 | break; |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index f40b373..0582586 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -1546,8 +1546,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1546 | if (m_parentScene.Permissions.CanEditObject(group.UUID, remoteClient.AgentId)) | 1546 | if (m_parentScene.Permissions.CanEditObject(group.UUID, remoteClient.AgentId)) |
1547 | { | 1547 | { |
1548 | SceneObjectPart part = m_parentScene.GetSceneObjectPart(primLocalID); | 1548 | SceneObjectPart part = m_parentScene.GetSceneObjectPart(primLocalID); |
1549 | part.ClickAction = Convert.ToByte(clickAction); | 1549 | if (part != null) |
1550 | group.HasGroupChanged = true; | 1550 | { |
1551 | part.ClickAction = Convert.ToByte(clickAction); | ||
1552 | group.HasGroupChanged = true; | ||
1553 | } | ||
1551 | } | 1554 | } |
1552 | } | 1555 | } |
1553 | } | 1556 | } |
@@ -1560,8 +1563,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1560 | if (m_parentScene.Permissions.CanEditObject(group.UUID, remoteClient.AgentId)) | 1563 | if (m_parentScene.Permissions.CanEditObject(group.UUID, remoteClient.AgentId)) |
1561 | { | 1564 | { |
1562 | SceneObjectPart part = m_parentScene.GetSceneObjectPart(primLocalID); | 1565 | SceneObjectPart part = m_parentScene.GetSceneObjectPart(primLocalID); |
1563 | part.Material = Convert.ToByte(material); | 1566 | if (part != null) |
1564 | group.HasGroupChanged = true; | 1567 | { |
1568 | part.Material = Convert.ToByte(material); | ||
1569 | group.HasGroupChanged = true; | ||
1570 | } | ||
1565 | } | 1571 | } |
1566 | } | 1572 | } |
1567 | } | 1573 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index fada688..c453366 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -146,27 +146,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
146 | return true; | 146 | return true; |
147 | return false; | 147 | return false; |
148 | } | 148 | } |
149 | 149 | ||
150 | /// <summary> | 150 | /// <summary> |
151 | /// Is this scene object acting as an attachment? | 151 | /// Is this scene object acting as an attachment? |
152 | /// </summary> | 152 | /// </summary> |
153 | /// <remarks> | 153 | public bool IsAttachment { get; set; } |
154 | /// We return false if the group has already been deleted. | ||
155 | /// | ||
156 | /// TODO: At the moment set must be done on the part itself. There may be a case for doing it here since I | ||
157 | /// presume either all or no parts in a linkset can be part of an attachment (in which | ||
158 | /// case the value would get proprogated down into all the descendent parts). | ||
159 | /// </remarks> | ||
160 | public bool IsAttachment | ||
161 | { | ||
162 | get | ||
163 | { | ||
164 | if (!IsDeleted) | ||
165 | return m_rootPart.IsAttachment; | ||
166 | |||
167 | return false; | ||
168 | } | ||
169 | } | ||
170 | 154 | ||
171 | /// <summary> | 155 | /// <summary> |
172 | /// The avatar to which this scene object is attached. | 156 | /// The avatar to which this scene object is attached. |
@@ -177,6 +161,31 @@ namespace OpenSim.Region.Framework.Scenes | |||
177 | public UUID AttachedAvatar { get; set; } | 161 | public UUID AttachedAvatar { get; set; } |
178 | 162 | ||
179 | /// <summary> | 163 | /// <summary> |
164 | /// Attachment point of this scene object to an avatar. | ||
165 | /// </summary> | ||
166 | /// <remarks> | ||
167 | /// 0 if we're not attached to anything | ||
168 | /// </remarks> | ||
169 | public uint AttachmentPoint | ||
170 | { | ||
171 | get | ||
172 | { | ||
173 | return m_rootPart.Shape.State; | ||
174 | } | ||
175 | |||
176 | set | ||
177 | { | ||
178 | IsAttachment = value != 0; | ||
179 | m_rootPart.Shape.State = (byte)value; | ||
180 | } | ||
181 | } | ||
182 | |||
183 | public void ClearPartAttachmentData() | ||
184 | { | ||
185 | AttachmentPoint = 0; | ||
186 | } | ||
187 | |||
188 | /// <summary> | ||
180 | /// Is this scene object phantom? | 189 | /// Is this scene object phantom? |
181 | /// </summary> | 190 | /// </summary> |
182 | /// <remarks> | 191 | /// <remarks> |
@@ -354,11 +363,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
354 | /// <summary> | 363 | /// <summary> |
355 | /// Check both the attachment property and the relevant properties of the underlying root part. | 364 | /// Check both the attachment property and the relevant properties of the underlying root part. |
356 | /// </summary> | 365 | /// </summary> |
366 | /// <remarks> | ||
357 | /// This is necessary in some cases, particularly when a scene object has just crossed into a region and doesn't | 367 | /// This is necessary in some cases, particularly when a scene object has just crossed into a region and doesn't |
358 | /// have the IsAttachment property yet checked. | 368 | /// have the IsAttachment property yet checked. |
359 | /// | 369 | /// |
360 | /// FIXME: However, this should be fixed so that this property | 370 | /// FIXME: However, this should be fixed so that this property |
361 | /// propertly reflects the underlying status. | 371 | /// propertly reflects the underlying status. |
372 | /// </remarks> | ||
362 | /// <returns></returns> | 373 | /// <returns></returns> |
363 | public bool IsAttachmentCheckFull() | 374 | public bool IsAttachmentCheckFull() |
364 | { | 375 | { |
@@ -982,23 +993,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
982 | } | 993 | } |
983 | } | 994 | } |
984 | 995 | ||
985 | public byte GetAttachmentPoint() | ||
986 | { | ||
987 | return m_rootPart.Shape.State; | ||
988 | } | ||
989 | |||
990 | public void SetAttachmentPoint(byte point) | ||
991 | { | ||
992 | SceneObjectPart[] parts = m_parts.GetArray(); | ||
993 | for (int i = 0; i < parts.Length; i++) | ||
994 | parts[i].SetAttachmentPoint(point); | ||
995 | } | ||
996 | |||
997 | public void ClearPartAttachmentData() | ||
998 | { | ||
999 | SetAttachmentPoint((Byte)0); | ||
1000 | } | ||
1001 | |||
1002 | /// <summary> | 996 | /// <summary> |
1003 | /// | 997 | /// |
1004 | /// </summary> | 998 | /// </summary> |
@@ -1424,16 +1418,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
1424 | 1418 | ||
1425 | // This is only necessary when userExposed is false! | 1419 | // This is only necessary when userExposed is false! |
1426 | 1420 | ||
1427 | bool previousAttachmentStatus = dupe.RootPart.IsAttachment; | 1421 | bool previousAttachmentStatus = dupe.IsAttachment; |
1428 | 1422 | ||
1429 | if (!userExposed) | 1423 | if (!userExposed) |
1430 | dupe.RootPart.IsAttachment = true; | 1424 | dupe.IsAttachment = true; |
1431 | 1425 | ||
1432 | dupe.AbsolutePosition = new Vector3(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z); | 1426 | dupe.AbsolutePosition = new Vector3(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z); |
1433 | 1427 | ||
1434 | if (!userExposed) | 1428 | if (!userExposed) |
1435 | { | 1429 | { |
1436 | dupe.RootPart.IsAttachment = previousAttachmentStatus; | 1430 | dupe.IsAttachment = previousAttachmentStatus; |
1437 | } | 1431 | } |
1438 | 1432 | ||
1439 | dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed); | 1433 | dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index e510611..71023a9 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -213,10 +213,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
213 | { | 213 | { |
214 | get { return m_fromUserInventoryItemID; } | 214 | get { return m_fromUserInventoryItemID; } |
215 | } | 215 | } |
216 | |||
217 | 216 | ||
218 | public bool IsAttachment; | ||
219 | |||
220 | 217 | ||
221 | public scriptEvents AggregateScriptEvents; | 218 | public scriptEvents AggregateScriptEvents; |
222 | 219 | ||
@@ -224,9 +221,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
224 | public Vector3 AttachedPos; | 221 | public Vector3 AttachedPos; |
225 | 222 | ||
226 | 223 | ||
227 | public uint AttachmentPoint; | ||
228 | |||
229 | |||
230 | public Vector3 RotationAxis = Vector3.One; | 224 | public Vector3 RotationAxis = Vector3.One; |
231 | 225 | ||
232 | 226 | ||
@@ -723,7 +717,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
723 | m_groupPosition = actor.Position; | 717 | m_groupPosition = actor.Position; |
724 | } | 718 | } |
725 | 719 | ||
726 | if (IsAttachment) | 720 | if (m_parentGroup.IsAttachment) |
727 | { | 721 | { |
728 | ScenePresence sp = m_parentGroup.Scene.GetScenePresence(ParentGroup.AttachedAvatar); | 722 | ScenePresence sp = m_parentGroup.Scene.GetScenePresence(ParentGroup.AttachedAvatar); |
729 | if (sp != null) | 723 | if (sp != null) |
@@ -807,7 +801,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
807 | { | 801 | { |
808 | if (IsRoot) | 802 | if (IsRoot) |
809 | { | 803 | { |
810 | if (IsAttachment) | 804 | if (m_parentGroup.IsAttachment) |
811 | return AttachedPos; | 805 | return AttachedPos; |
812 | else | 806 | else |
813 | return AbsolutePosition; | 807 | return AbsolutePosition; |
@@ -1090,7 +1084,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1090 | { | 1084 | { |
1091 | get | 1085 | get |
1092 | { | 1086 | { |
1093 | if (IsAttachment) | 1087 | if (m_parentGroup.IsAttachment) |
1094 | return GroupPosition; | 1088 | return GroupPosition; |
1095 | 1089 | ||
1096 | return m_offsetPosition + m_groupPosition; | 1090 | return m_offsetPosition + m_groupPosition; |
@@ -1588,7 +1582,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1588 | 1582 | ||
1589 | // The only time the physics scene shouldn't know about the prim is if it's phantom or an attachment, which is phantom by definition | 1583 | // The only time the physics scene shouldn't know about the prim is if it's phantom or an attachment, which is phantom by definition |
1590 | // or flexible | 1584 | // or flexible |
1591 | if (!isPhantom && !IsAttachment && !(Shape.PathCurve == (byte) Extrusion.Flexible)) | 1585 | if (!isPhantom && !m_parentGroup.IsAttachment && !(Shape.PathCurve == (byte) Extrusion.Flexible)) |
1592 | { | 1586 | { |
1593 | try | 1587 | try |
1594 | { | 1588 | { |
@@ -2880,7 +2874,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2880 | 2874 | ||
2881 | public void rotLookAt(Quaternion target, float strength, float damping) | 2875 | public void rotLookAt(Quaternion target, float strength, float damping) |
2882 | { | 2876 | { |
2883 | if (IsAttachment) | 2877 | if (m_parentGroup.IsAttachment) |
2884 | { | 2878 | { |
2885 | /* | 2879 | /* |
2886 | ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar); | 2880 | ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar); |
@@ -3014,7 +3008,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3014 | 3008 | ||
3015 | if (IsRoot) | 3009 | if (IsRoot) |
3016 | { | 3010 | { |
3017 | if (IsAttachment) | 3011 | if (m_parentGroup.IsAttachment) |
3018 | { | 3012 | { |
3019 | SendFullUpdateToClient(remoteClient, AttachedPos, clientFlags); | 3013 | SendFullUpdateToClient(remoteClient, AttachedPos, clientFlags); |
3020 | } | 3014 | } |
@@ -3076,7 +3070,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3076 | { | 3070 | { |
3077 | // Suppress full updates during attachment editing | 3071 | // Suppress full updates during attachment editing |
3078 | // | 3072 | // |
3079 | if (ParentGroup.IsSelected && IsAttachment) | 3073 | if (ParentGroup.IsSelected && ParentGroup.IsAttachment) |
3080 | return; | 3074 | return; |
3081 | 3075 | ||
3082 | if (ParentGroup.IsDeleted) | 3076 | if (ParentGroup.IsDeleted) |
@@ -3254,26 +3248,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3254 | }); | 3248 | }); |
3255 | } | 3249 | } |
3256 | 3250 | ||
3257 | public void SetAttachmentPoint(uint AttachmentPoint) | ||
3258 | { | ||
3259 | this.AttachmentPoint = AttachmentPoint; | ||
3260 | |||
3261 | if (AttachmentPoint != 0) | ||
3262 | { | ||
3263 | IsAttachment = true; | ||
3264 | } | ||
3265 | else | ||
3266 | { | ||
3267 | IsAttachment = false; | ||
3268 | } | ||
3269 | |||
3270 | // save the attachment point. | ||
3271 | //if (AttachmentPoint != 0) | ||
3272 | //{ | ||
3273 | m_shape.State = (byte)AttachmentPoint; | ||
3274 | //} | ||
3275 | } | ||
3276 | |||
3277 | public void SetAxisRotation(int axis, int rotate) | 3251 | public void SetAxisRotation(int axis, int rotate) |
3278 | { | 3252 | { |
3279 | if (m_parentGroup != null) | 3253 | if (m_parentGroup != null) |
@@ -4497,7 +4471,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
4497 | } | 4471 | } |
4498 | } | 4472 | } |
4499 | 4473 | ||
4500 | if (SetPhantom || IsAttachment || (Shape.PathCurve == (byte)Extrusion.Flexible)) // note: this may have been changed above in the case of joints | 4474 | if (SetPhantom |
4475 | || ParentGroup.IsAttachment | ||
4476 | || (Shape.PathCurve == (byte)Extrusion.Flexible)) // note: this may have been changed above in the case of joints | ||
4501 | { | 4477 | { |
4502 | AddFlag(PrimFlags.Phantom); | 4478 | AddFlag(PrimFlags.Phantom); |
4503 | if (PhysActor != null) | 4479 | if (PhysActor != null) |
@@ -4928,7 +4904,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4928 | if (ParentGroup == null || ParentGroup.IsDeleted) | 4904 | if (ParentGroup == null || ParentGroup.IsDeleted) |
4929 | return; | 4905 | return; |
4930 | 4906 | ||
4931 | if (IsAttachment && ParentGroup.RootPart != this) | 4907 | if (ParentGroup.IsAttachment && ParentGroup.RootPart != this) |
4932 | return; | 4908 | return; |
4933 | 4909 | ||
4934 | // Causes this thread to dig into the Client Thread Data. | 4910 | // Causes this thread to dig into the Client Thread Data. |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 3b60f8c..108089e 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -201,7 +201,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
201 | // Don't let this set the HasGroupChanged flag for attachments | 201 | // Don't let this set the HasGroupChanged flag for attachments |
202 | // as this happens during rez and we don't want a new asset | 202 | // as this happens during rez and we don't want a new asset |
203 | // for each attachment each time | 203 | // for each attachment each time |
204 | if (!m_part.ParentGroup.RootPart.IsAttachment) | 204 | if (!m_part.ParentGroup.IsAttachment) |
205 | { | 205 | { |
206 | HasInventoryChanged = true; | 206 | HasInventoryChanged = true; |
207 | m_part.ParentGroup.HasGroupChanged = true; | 207 | m_part.ParentGroup.HasGroupChanged = true; |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index fc89473..4148d4b 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -965,6 +965,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
965 | presence.Animator.SendAnimPackToClient(ControllingClient); | 965 | presence.Animator.SendAnimPackToClient(ControllingClient); |
966 | }); | 966 | }); |
967 | 967 | ||
968 | // If we don't reset the movement flag here, an avatar that crosses to a neighbouring sim and returns will | ||
969 | // stall on the border crossing since the existing child agent will still have the last movement | ||
970 | // recorded, which stops the input from being processed. | ||
971 | m_movementflag = 0; | ||
972 | |||
968 | m_scene.EventManager.TriggerOnMakeRootAgent(this); | 973 | m_scene.EventManager.TriggerOnMakeRootAgent(this); |
969 | } | 974 | } |
970 | 975 | ||
@@ -1247,6 +1252,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1247 | /// </summary> | 1252 | /// </summary> |
1248 | public void HandleAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData) | 1253 | public void HandleAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData) |
1249 | { | 1254 | { |
1255 | // m_log.DebugFormat("[SCENE PRESENCE]: Received agent update from {0}", remoteClient.Name); | ||
1256 | |||
1250 | //if (m_isChildAgent) | 1257 | //if (m_isChildAgent) |
1251 | //{ | 1258 | //{ |
1252 | // // m_log.Debug("DEBUG: HandleAgentUpdate: child agent"); | 1259 | // // m_log.Debug("DEBUG: HandleAgentUpdate: child agent"); |
@@ -1445,6 +1452,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1445 | { | 1452 | { |
1446 | m_movementflag |= (byte)nudgehack; | 1453 | m_movementflag |= (byte)nudgehack; |
1447 | } | 1454 | } |
1455 | |||
1456 | // m_log.DebugFormat("[SCENE PRESENCE]: Updating m_movementflag for {0} with {1}", Name, DCF); | ||
1448 | m_movementflag += (byte)(uint)DCF; | 1457 | m_movementflag += (byte)(uint)DCF; |
1449 | update_movementflag = true; | 1458 | update_movementflag = true; |
1450 | } | 1459 | } |
@@ -1456,6 +1465,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1456 | && ((m_movementflag & (byte)nudgehack) == nudgehack)) | 1465 | && ((m_movementflag & (byte)nudgehack) == nudgehack)) |
1457 | ) // This or is for Nudge forward | 1466 | ) // This or is for Nudge forward |
1458 | { | 1467 | { |
1468 | // m_log.DebugFormat("[SCENE PRESENCE]: Updating m_movementflag for {0} with lack of {1}", Name, DCF); | ||
1459 | m_movementflag -= ((byte)(uint)DCF); | 1469 | m_movementflag -= ((byte)(uint)DCF); |
1460 | update_movementflag = true; | 1470 | update_movementflag = true; |
1461 | 1471 | ||
@@ -1520,12 +1530,21 @@ namespace OpenSim.Region.Framework.Scenes | |||
1520 | // which occurs later in the main scene loop | 1530 | // which occurs later in the main scene loop |
1521 | if (update_movementflag || (update_rotation && DCFlagKeyPressed)) | 1531 | if (update_movementflag || (update_rotation && DCFlagKeyPressed)) |
1522 | { | 1532 | { |
1523 | // m_log.DebugFormat("{0} {1}", update_movementflag, (update_rotation && DCFlagKeyPressed)); | 1533 | // m_log.DebugFormat( |
1524 | // m_log.DebugFormat( | 1534 | // "[SCENE PRESENCE]: In {0} adding velocity of {1} to {2}, umf = {3}, ur = {4}", |
1525 | // "In {0} adding velocity to {1} of {2}", m_scene.RegionInfo.RegionName, Name, agent_control_v3); | 1535 | // m_scene.RegionInfo.RegionName, agent_control_v3, Name, update_movementflag, update_rotation); |
1526 | 1536 | ||
1527 | AddNewMovement(agent_control_v3); | 1537 | AddNewMovement(agent_control_v3); |
1528 | } | 1538 | } |
1539 | // else | ||
1540 | // { | ||
1541 | // if (!update_movementflag) | ||
1542 | // { | ||
1543 | // m_log.DebugFormat( | ||
1544 | // "[SCENE PRESENCE]: In {0} ignoring requested update of {1} for {2} as update_movementflag = false", | ||
1545 | // m_scene.RegionInfo.RegionName, agent_control_v3, Name); | ||
1546 | // } | ||
1547 | // } | ||
1529 | 1548 | ||
1530 | if (update_movementflag && m_parentID == 0) | 1549 | if (update_movementflag && m_parentID == 0) |
1531 | Animator.UpdateMovementAnimations(); | 1550 | Animator.UpdateMovementAnimations(); |
@@ -3178,7 +3197,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3178 | ISceneObject clone = sog.CloneForNewScene(); | 3197 | ISceneObject clone = sog.CloneForNewScene(); |
3179 | // Attachment module assumes that GroupPosition holds the offsets...! | 3198 | // Attachment module assumes that GroupPosition holds the offsets...! |
3180 | ((SceneObjectGroup)clone).RootPart.GroupPosition = sog.RootPart.AttachedPos; | 3199 | ((SceneObjectGroup)clone).RootPart.GroupPosition = sog.RootPart.AttachedPos; |
3181 | ((SceneObjectGroup)clone).RootPart.IsAttachment = false; | 3200 | ((SceneObjectGroup)clone).IsAttachment = false; |
3182 | cAgent.AttachmentObjects.Add(clone); | 3201 | cAgent.AttachmentObjects.Add(clone); |
3183 | string state = sog.GetStateSnapshot(); | 3202 | string state = sog.GetStateSnapshot(); |
3184 | cAgent.AttachmentObjectStates.Add(state); | 3203 | cAgent.AttachmentObjectStates.Add(state); |
@@ -3477,7 +3496,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3477 | { | 3496 | { |
3478 | foreach (SceneObjectGroup so in m_attachments) | 3497 | foreach (SceneObjectGroup so in m_attachments) |
3479 | { | 3498 | { |
3480 | if (attachmentPoint == so.RootPart.AttachmentPoint) | 3499 | if (attachmentPoint == so.AttachmentPoint) |
3481 | attachments.Add(so); | 3500 | attachments.Add(so); |
3482 | } | 3501 | } |
3483 | } | 3502 | } |
@@ -3869,12 +3888,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
3869 | { | 3888 | { |
3870 | if (grp.HasGroupChanged) // Resizer scripts? | 3889 | if (grp.HasGroupChanged) // Resizer scripts? |
3871 | { | 3890 | { |
3872 | grp.RootPart.IsAttachment = false; | 3891 | grp.IsAttachment = false; |
3873 | grp.AbsolutePosition = grp.RootPart.AttachedPos; | 3892 | grp.AbsolutePosition = grp.RootPart.AttachedPos; |
3874 | // grp.DetachToInventoryPrep(); | 3893 | // grp.DetachToInventoryPrep(); |
3875 | attachmentsModule.UpdateKnownItem(ControllingClient, | 3894 | attachmentsModule.UpdateKnownItem(ControllingClient, |
3876 | grp, grp.GetFromItemID(), grp.OwnerID); | 3895 | grp, grp.GetFromItemID(), grp.OwnerID); |
3877 | grp.RootPart.IsAttachment = true; | 3896 | grp.IsAttachment = true; |
3878 | } | 3897 | } |
3879 | } | 3898 | } |
3880 | } | 3899 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneViewer.cs b/OpenSim/Region/Framework/Scenes/SceneViewer.cs index 7c067ca..997845b 100644 --- a/OpenSim/Region/Framework/Scenes/SceneViewer.cs +++ b/OpenSim/Region/Framework/Scenes/SceneViewer.cs | |||
@@ -120,8 +120,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
120 | // We deal with the possibility that two updates occur at | 120 | // We deal with the possibility that two updates occur at |
121 | // the same unix time at the update point itself. | 121 | // the same unix time at the update point itself. |
122 | 122 | ||
123 | if ((update.LastFullUpdateTime < part.TimeStampFull) || | 123 | if ((update.LastFullUpdateTime < part.TimeStampFull) || part.ParentGroup.IsAttachment) |
124 | part.IsAttachment) | ||
125 | { | 124 | { |
126 | // m_log.DebugFormat( | 125 | // m_log.DebugFormat( |
127 | // "[SCENE PRESENCE]: Fully updating prim {0}, {1} - part timestamp {2}", | 126 | // "[SCENE PRESENCE]: Fully updating prim {0}, {1} - part timestamp {2}", |