diff options
author | Melanie | 2011-11-02 23:42:37 +0100 |
---|---|---|
committer | Melanie | 2011-11-02 23:42:37 +0100 |
commit | 26a4f320135d79da16094f3b218f607c3fd628c6 (patch) | |
tree | 9da53bad404a7d9a0de5065bc7cf6719566a0f17 /OpenSim/Region/Framework/Scenes | |
parent | Fix link order when linking sets to sets (diff) | |
parent | Merge branch 'master' into bigmerge (diff) | |
download | opensim-SC_OLD-26a4f320135d79da16094f3b218f607c3fd628c6.zip opensim-SC_OLD-26a4f320135d79da16094f3b218f607c3fd628c6.tar.gz opensim-SC_OLD-26a4f320135d79da16094f3b218f607c3fd628c6.tar.bz2 opensim-SC_OLD-26a4f320135d79da16094f3b218f607c3fd628c6.tar.xz |
Merge branch 'bigmerge' of ssh://3dhosting.de/var/git/careminster into bigmerge
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
7 files changed, 73 insertions, 82 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 0f5e99d..e1fde64 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -1907,8 +1907,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1907 | SceneObjectPart newRoot = newSet[0]; | 1907 | SceneObjectPart newRoot = newSet[0]; |
1908 | newSet.RemoveAt(0); | 1908 | newSet.RemoveAt(0); |
1909 | 1909 | ||
1910 | foreach (SceneObjectPart newChild in newSet) | 1910 | foreach (SceneObjectPart newChild in newSet) |
1911 | newChild.UpdateFlag = 0; | 1911 | newChild.ClearUpdateSchedule(); |
1912 | 1912 | ||
1913 | newRoot.ParentGroup.areUpdatesSuspended = true; | 1913 | newRoot.ParentGroup.areUpdatesSuspended = true; |
1914 | LinkObjects(newRoot, newSet); | 1914 | LinkObjects(newRoot, newSet); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 3a863e7..6204b4f 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -1479,8 +1479,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1479 | avatar.StandUp(); | 1479 | avatar.StandUp(); |
1480 | 1480 | ||
1481 | if (!silent) | 1481 | if (!silent) |
1482 | { | 1482 | { |
1483 | part.UpdateFlag = 0; | 1483 | part.ClearUpdateSchedule(); |
1484 | if (part == m_rootPart) | 1484 | if (part == m_rootPart) |
1485 | { | 1485 | { |
1486 | if (!IsAttachment || (AttachedAvatar == avatar.ControllingClient.AgentId) || | 1486 | if (!IsAttachment || (AttachedAvatar == avatar.ControllingClient.AgentId) || |
@@ -2123,13 +2123,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
2123 | 2123 | ||
2124 | if (UsePhysics && !AbsolutePosition.ApproxEquals(lastPhysGroupPos, 0.02f)) | 2124 | if (UsePhysics && !AbsolutePosition.ApproxEquals(lastPhysGroupPos, 0.02f)) |
2125 | { | 2125 | { |
2126 | m_rootPart.UpdateFlag = 1; | 2126 | m_rootPart.UpdateFlag = UpdateRequired.TERSE; |
2127 | lastPhysGroupPos = AbsolutePosition; | 2127 | lastPhysGroupPos = AbsolutePosition; |
2128 | } | 2128 | } |
2129 | 2129 | ||
2130 | if (UsePhysics && !GroupRotation.ApproxEquals(lastPhysGroupRot, 0.1f)) | 2130 | if (UsePhysics && !GroupRotation.ApproxEquals(lastPhysGroupRot, 0.1f)) |
2131 | { | 2131 | { |
2132 | m_rootPart.UpdateFlag = 1; | 2132 | m_rootPart.UpdateFlag = UpdateRequired.TERSE; |
2133 | lastPhysGroupRot = GroupRotation; | 2133 | lastPhysGroupRot = GroupRotation; |
2134 | } | 2134 | } |
2135 | 2135 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index a2e13ce..948518a 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -107,6 +107,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
107 | SCULPT = 7 | 107 | SCULPT = 7 |
108 | } | 108 | } |
109 | 109 | ||
110 | public enum UpdateRequired : byte | ||
111 | { | ||
112 | NONE = 0, | ||
113 | TERSE = 1, | ||
114 | FULL = 2 | ||
115 | } | ||
116 | |||
110 | #endregion Enumerations | 117 | #endregion Enumerations |
111 | 118 | ||
112 | public class SceneObjectPart : IScriptHost, ISceneEntity | 119 | public class SceneObjectPart : IScriptHost, ISceneEntity |
@@ -265,15 +272,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
265 | 272 | ||
266 | private bool m_passTouches; | 273 | private bool m_passTouches; |
267 | 274 | ||
268 | /// <summary> | 275 | private UpdateRequired m_updateFlag; |
269 | /// Only used internally to schedule client updates. | ||
270 | /// 0 - no update is scheduled | ||
271 | /// 1 - terse update scheduled | ||
272 | /// 2 - full update scheduled | ||
273 | /// | ||
274 | /// TODO - This should be an enumeration | ||
275 | /// </summary> | ||
276 | private byte m_updateFlag; | ||
277 | 276 | ||
278 | private PhysicsActor m_physActor; | 277 | private PhysicsActor m_physActor; |
279 | protected Vector3 m_acceleration; | 278 | protected Vector3 m_acceleration; |
@@ -908,7 +907,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
908 | } | 907 | } |
909 | } | 908 | } |
910 | 909 | ||
911 | /// <summary></summary> | 910 | /// <summary>Update angular velocity and schedule terse update.</summary> |
911 | public void UpdateAngularVelocity(Vector3 avel) | ||
912 | { | ||
913 | AngularVelocity = avel; | ||
914 | ScheduleTerseUpdate(); | ||
915 | ParentGroup.HasGroupChanged = true; | ||
916 | } | ||
917 | |||
918 | /// <summary>Get or set angular velocity. Does not schedule update.</summary> | ||
912 | public Vector3 AngularVelocity | 919 | public Vector3 AngularVelocity |
913 | { | 920 | { |
914 | get | 921 | get |
@@ -1056,8 +1063,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1056 | TriggerScriptChangedEvent(Changed.SCALE); | 1063 | TriggerScriptChangedEvent(Changed.SCALE); |
1057 | } | 1064 | } |
1058 | } | 1065 | } |
1059 | 1066 | ||
1060 | public byte UpdateFlag | 1067 | public UpdateRequired UpdateFlag |
1061 | { | 1068 | { |
1062 | get { return m_updateFlag; } | 1069 | get { return m_updateFlag; } |
1063 | set { m_updateFlag = value; } | 1070 | set { m_updateFlag = value; } |
@@ -1362,9 +1369,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1362 | /// <summary> | 1369 | /// <summary> |
1363 | /// Clear all pending updates of parts to clients | 1370 | /// Clear all pending updates of parts to clients |
1364 | /// </summary> | 1371 | /// </summary> |
1365 | private void ClearUpdateSchedule() | 1372 | public void ClearUpdateSchedule() |
1366 | { | 1373 | { |
1367 | m_updateFlag = 0; | 1374 | UpdateFlag = UpdateRequired.NONE; |
1368 | } | 1375 | } |
1369 | 1376 | ||
1370 | /// <summary> | 1377 | /// <summary> |
@@ -2884,7 +2891,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2884 | TimeStampFull = (uint)timeNow; | 2891 | TimeStampFull = (uint)timeNow; |
2885 | } | 2892 | } |
2886 | 2893 | ||
2887 | m_updateFlag = 2; | 2894 | UpdateFlag = UpdateRequired.FULL; |
2888 | 2895 | ||
2889 | // m_log.DebugFormat( | 2896 | // m_log.DebugFormat( |
2890 | // "[SCENE OBJECT PART]: Scheduling full update for {0}, {1} at {2}", | 2897 | // "[SCENE OBJECT PART]: Scheduling full update for {0}, {1} at {2}", |
@@ -2900,13 +2907,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
2900 | if (m_parentGroup == null) | 2907 | if (m_parentGroup == null) |
2901 | return; | 2908 | return; |
2902 | 2909 | ||
2903 | if (m_updateFlag < 1) | 2910 | if (UpdateFlag == UpdateRequired.NONE) |
2904 | { | 2911 | { |
2905 | m_parentGroup.HasGroupChanged = true; | 2912 | m_parentGroup.HasGroupChanged = true; |
2906 | m_parentGroup.QueueForUpdateCheck(); | 2913 | m_parentGroup.QueueForUpdateCheck(); |
2907 | 2914 | ||
2908 | TimeStampTerse = (uint) Util.UnixTimeSinceEpoch(); | 2915 | TimeStampTerse = (uint) Util.UnixTimeSinceEpoch(); |
2909 | m_updateFlag = 1; | 2916 | UpdateFlag = UpdateRequired.TERSE; |
2910 | 2917 | ||
2911 | // m_log.DebugFormat( | 2918 | // m_log.DebugFormat( |
2912 | // "[SCENE OBJECT PART]: Scheduling terse update for {0}, {1} at {2}", | 2919 | // "[SCENE OBJECT PART]: Scheduling terse update for {0}, {1} at {2}", |
@@ -3073,48 +3080,40 @@ namespace OpenSim.Region.Framework.Scenes | |||
3073 | const float POSITION_TOLERANCE = 0.05f; // I don't like this, but I suppose it's necessary | 3080 | const float POSITION_TOLERANCE = 0.05f; // I don't like this, but I suppose it's necessary |
3074 | const int TIME_MS_TOLERANCE = 200; //llSetPos has a 200ms delay. This should NOT be 3 seconds. | 3081 | const int TIME_MS_TOLERANCE = 200; //llSetPos has a 200ms delay. This should NOT be 3 seconds. |
3075 | 3082 | ||
3076 | if (m_updateFlag == 1) | 3083 | switch (UpdateFlag) |
3077 | { | 3084 | { |
3078 | // Throw away duplicate or insignificant updates | 3085 | case UpdateRequired.TERSE: |
3079 | if (!RotationOffset.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) || | ||
3080 | !Acceleration.Equals(m_lastAcceleration) || | ||
3081 | !Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) || | ||
3082 | Velocity.ApproxEquals(Vector3.Zero, VELOCITY_TOLERANCE) || | ||
3083 | !AngularVelocity.ApproxEquals(m_lastAngularVelocity, VELOCITY_TOLERANCE) || | ||
3084 | !OffsetPosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) || | ||
3085 | Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE) | ||
3086 | { | 3086 | { |
3087 | AddTerseUpdateToAllAvatars(); | 3087 | // Throw away duplicate or insignificant updates |
3088 | 3088 | if (!RotationOffset.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) || | |
3089 | 3089 | !Acceleration.Equals(m_lastAcceleration) || | |
3090 | // This causes the Scene to 'poll' physical objects every couple of frames | 3090 | !Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) || |
3091 | // bad, so it's been replaced by an event driven method. | 3091 | Velocity.ApproxEquals(Vector3.Zero, VELOCITY_TOLERANCE) || |
3092 | //if ((ObjectFlags & (uint)PrimFlags.Physics) != 0) | 3092 | !AngularVelocity.ApproxEquals(m_lastAngularVelocity, VELOCITY_TOLERANCE) || |
3093 | //{ | 3093 | !OffsetPosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) || |
3094 | // Only send the constant terse updates on physical objects! | 3094 | Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE) |
3095 | //ScheduleTerseUpdate(); | 3095 | { |
3096 | //} | 3096 | AddTerseUpdateToAllAvatars(); |
3097 | 3097 | ClearUpdateSchedule(); | |
3098 | // Update the "last" values | 3098 | |
3099 | m_lastPosition = OffsetPosition; | 3099 | // Update the "last" values |
3100 | m_lastRotation = RotationOffset; | 3100 | m_lastPosition = OffsetPosition; |
3101 | m_lastVelocity = Velocity; | 3101 | m_lastRotation = RotationOffset; |
3102 | m_lastAcceleration = Acceleration; | 3102 | m_lastVelocity = Velocity; |
3103 | m_lastAngularVelocity = AngularVelocity; | 3103 | m_lastAcceleration = Acceleration; |
3104 | m_lastTerseSent = Environment.TickCount; | 3104 | m_lastAngularVelocity = AngularVelocity; |
3105 | m_lastTerseSent = Environment.TickCount; | ||
3106 | } | ||
3107 | break; | ||
3105 | } | 3108 | } |
3106 | //Moved this outside of the if clause so updates don't get blocked.. *sigh* | 3109 | case UpdateRequired.FULL: |
3107 | m_updateFlag = 0; //Why were we calling a function to do this? Inefficient! *screams* | ||
3108 | } | ||
3109 | else | ||
3110 | { | ||
3111 | if (m_updateFlag == 2) // is a new prim, just created/reloaded or has major changes | ||
3112 | { | 3110 | { |
3113 | AddFullUpdateToAllAvatars(); | 3111 | AddFullUpdateToAllAvatars(); |
3114 | m_updateFlag = 0; //Same here | 3112 | break; |
3115 | } | 3113 | } |
3116 | } | 3114 | } |
3117 | m_updateFlag = 0; | 3115 | |
3116 | ClearUpdateSchedule(); | ||
3118 | } | 3117 | } |
3119 | 3118 | ||
3120 | /// <summary> | 3119 | /// <summary> |
@@ -3492,7 +3491,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3492 | _groupID = groupID; | 3491 | _groupID = groupID; |
3493 | if (client != null) | 3492 | if (client != null) |
3494 | SendPropertiesToClient(client); | 3493 | SendPropertiesToClient(client); |
3495 | m_updateFlag = 2; | 3494 | UpdateFlag = UpdateRequired.FULL; |
3496 | } | 3495 | } |
3497 | 3496 | ||
3498 | /// <summary> | 3497 | /// <summary> |
@@ -4699,7 +4698,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4699 | { | 4698 | { |
4700 | m_shape.TextureEntry = textureEntry; | 4699 | m_shape.TextureEntry = textureEntry; |
4701 | TriggerScriptChangedEvent(Changed.TEXTURE); | 4700 | TriggerScriptChangedEvent(Changed.TEXTURE); |
4702 | m_updateFlag = 1; | 4701 | UpdateFlag = UpdateRequired.FULL; |
4703 | ParentGroup.HasGroupChanged = true; | 4702 | ParentGroup.HasGroupChanged = true; |
4704 | 4703 | ||
4705 | //This is madness.. | 4704 | //This is madness.. |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index bba746f..aa1c15e 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2980,7 +2980,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2980 | /// </summary> | 2980 | /// </summary> |
2981 | public void SendAppearanceToAllOtherAgents() | 2981 | public void SendAppearanceToAllOtherAgents() |
2982 | { | 2982 | { |
2983 | //m_log.DebugFormat("[SCENE PRESENCE] SendAppearanceToAllOtherAgents: {0} ({1})", Name, UUID); | 2983 | // m_log.DebugFormat("[SCENE PRESENCE] SendAppearanceToAllOtherAgents: {0} {1}", Name, UUID); |
2984 | |||
2984 | // only send update from root agents to other clients; children are only "listening posts" | 2985 | // only send update from root agents to other clients; children are only "listening posts" |
2985 | if (IsChildAgent) | 2986 | if (IsChildAgent) |
2986 | { | 2987 | { |
@@ -3008,7 +3009,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3008 | /// </summary> | 3009 | /// </summary> |
3009 | public void SendOtherAgentsAppearanceToMe() | 3010 | public void SendOtherAgentsAppearanceToMe() |
3010 | { | 3011 | { |
3011 | //m_log.DebugFormat("[SCENE PRESENCE] SendOtherAgentsAppearanceToMe: {0} ({1})", Name, UUID); | 3012 | // m_log.DebugFormat("[SCENE PRESENCE] SendOtherAgentsAppearanceToMe: {0} {1}", Name, UUID); |
3012 | 3013 | ||
3013 | int count = 0; | 3014 | int count = 0; |
3014 | m_scene.ForEachRootScenePresence(delegate(ScenePresence scenePresence) | 3015 | m_scene.ForEachRootScenePresence(delegate(ScenePresence scenePresence) |
@@ -3564,7 +3565,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3564 | foreach (ISceneObject so in cAgent.AttachmentObjects) | 3565 | foreach (ISceneObject so in cAgent.AttachmentObjects) |
3565 | { | 3566 | { |
3566 | ((SceneObjectGroup)so).LocalId = 0; | 3567 | ((SceneObjectGroup)so).LocalId = 0; |
3567 | ((SceneObjectGroup)so).RootPart.UpdateFlag = 0; | 3568 | ((SceneObjectGroup)so).RootPart.ClearUpdateSchedule(); |
3568 | so.SetState(cAgent.AttachmentObjectStates[i++], m_scene); | 3569 | so.SetState(cAgent.AttachmentObjectStates[i++], m_scene); |
3569 | m_scene.IncomingCreateObject(so); | 3570 | m_scene.IncomingCreateObject(so); |
3570 | } | 3571 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 11dad6c..680a6fa 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -316,7 +316,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
316 | m_SOPXmlProcessors.Add("ClickAction", ProcessClickAction); | 316 | m_SOPXmlProcessors.Add("ClickAction", ProcessClickAction); |
317 | m_SOPXmlProcessors.Add("Shape", ProcessShape); | 317 | m_SOPXmlProcessors.Add("Shape", ProcessShape); |
318 | m_SOPXmlProcessors.Add("Scale", ProcessScale); | 318 | m_SOPXmlProcessors.Add("Scale", ProcessScale); |
319 | m_SOPXmlProcessors.Add("UpdateFlag", ProcessUpdateFlag); | ||
320 | m_SOPXmlProcessors.Add("SitTargetOrientation", ProcessSitTargetOrientation); | 319 | m_SOPXmlProcessors.Add("SitTargetOrientation", ProcessSitTargetOrientation); |
321 | m_SOPXmlProcessors.Add("SitTargetPosition", ProcessSitTargetPosition); | 320 | m_SOPXmlProcessors.Add("SitTargetPosition", ProcessSitTargetPosition); |
322 | m_SOPXmlProcessors.Add("SitTargetPositionLL", ProcessSitTargetPositionLL); | 321 | m_SOPXmlProcessors.Add("SitTargetPositionLL", ProcessSitTargetPositionLL); |
@@ -586,11 +585,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
586 | obj.Scale = Util.ReadVector(reader, "Scale"); | 585 | obj.Scale = Util.ReadVector(reader, "Scale"); |
587 | } | 586 | } |
588 | 587 | ||
589 | private static void ProcessUpdateFlag(SceneObjectPart obj, XmlTextReader reader) | ||
590 | { | ||
591 | obj.UpdateFlag = (byte)reader.ReadElementContentAsInt("UpdateFlag", String.Empty); | ||
592 | } | ||
593 | |||
594 | private static void ProcessSitTargetOrientation(SceneObjectPart obj, XmlTextReader reader) | 588 | private static void ProcessSitTargetOrientation(SceneObjectPart obj, XmlTextReader reader) |
595 | { | 589 | { |
596 | obj.SitTargetOrientation = Util.ReadQuaternion(reader, "SitTargetOrientation"); | 590 | obj.SitTargetOrientation = Util.ReadQuaternion(reader, "SitTargetOrientation"); |
@@ -1194,7 +1188,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1194 | WriteShape(writer, sop.Shape, options); | 1188 | WriteShape(writer, sop.Shape, options); |
1195 | 1189 | ||
1196 | WriteVector(writer, "Scale", sop.Scale); | 1190 | WriteVector(writer, "Scale", sop.Scale); |
1197 | writer.WriteElementString("UpdateFlag", sop.UpdateFlag.ToString()); | ||
1198 | WriteQuaternion(writer, "SitTargetOrientation", sop.SitTargetOrientation); | 1191 | WriteQuaternion(writer, "SitTargetOrientation", sop.SitTargetOrientation); |
1199 | WriteVector(writer, "SitTargetPosition", sop.SitTargetPosition); | 1192 | WriteVector(writer, "SitTargetPosition", sop.SitTargetPosition); |
1200 | WriteVector(writer, "SitTargetPositionLL", sop.SitTargetPositionLL); | 1193 | WriteVector(writer, "SitTargetPositionLL", sop.SitTargetPositionLL); |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs index 90cdd7b..a2332bb 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs | |||
@@ -70,8 +70,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
70 | grp2.UpdateGroupRotationR(Quaternion.CreateFromEulers(180 * Utils.DEG_TO_RAD, 0, 0)); | 70 | grp2.UpdateGroupRotationR(Quaternion.CreateFromEulers(180 * Utils.DEG_TO_RAD, 0, 0)); |
71 | 71 | ||
72 | // Required for linking | 72 | // Required for linking |
73 | grp1.RootPart.UpdateFlag = 0; | 73 | grp1.RootPart.ClearUpdateSchedule(); |
74 | grp2.RootPart.UpdateFlag = 0; | 74 | grp2.RootPart.ClearUpdateSchedule(); |
75 | 75 | ||
76 | // Link grp2 to grp1. part2 becomes child prim to grp1. grp2 is eliminated. | 76 | // Link grp2 to grp1. part2 becomes child prim to grp1. grp2 is eliminated. |
77 | grp1.LinkToGroup(grp2); | 77 | grp1.LinkToGroup(grp2); |
@@ -164,10 +164,10 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
164 | grp4.UpdateGroupRotationR(Quaternion.CreateFromEulers(0, 90 * Utils.DEG_TO_RAD, 0)); | 164 | grp4.UpdateGroupRotationR(Quaternion.CreateFromEulers(0, 90 * Utils.DEG_TO_RAD, 0)); |
165 | 165 | ||
166 | // Required for linking | 166 | // Required for linking |
167 | grp1.RootPart.UpdateFlag = 0; | 167 | grp1.RootPart.ClearUpdateSchedule(); |
168 | grp2.RootPart.UpdateFlag = 0; | 168 | grp2.RootPart.ClearUpdateSchedule(); |
169 | grp3.RootPart.UpdateFlag = 0; | 169 | grp3.RootPart.ClearUpdateSchedule(); |
170 | grp4.RootPart.UpdateFlag = 0; | 170 | grp4.RootPart.ClearUpdateSchedule(); |
171 | 171 | ||
172 | // Link grp2 to grp1. part2 becomes child prim to grp1. grp2 is eliminated. | 172 | // Link grp2 to grp1. part2 becomes child prim to grp1. grp2 is eliminated. |
173 | grp1.LinkToGroup(grp2); | 173 | grp1.LinkToGroup(grp2); |
@@ -198,8 +198,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
198 | } | 198 | } |
199 | 199 | ||
200 | // Required for linking | 200 | // Required for linking |
201 | grp1.RootPart.UpdateFlag = 0; | 201 | grp1.RootPart.ClearUpdateSchedule(); |
202 | grp3.RootPart.UpdateFlag = 0; | 202 | grp3.RootPart.ClearUpdateSchedule(); |
203 | 203 | ||
204 | // root part should have no offset position or rotation | 204 | // root part should have no offset position or rotation |
205 | Assert.That(part1.OffsetPosition == Vector3.Zero && part1.RotationOffset == Quaternion.Identity, | 205 | Assert.That(part1.OffsetPosition == Vector3.Zero && part1.RotationOffset == Quaternion.Identity, |
diff --git a/OpenSim/Region/Framework/Scenes/UndoState.cs b/OpenSim/Region/Framework/Scenes/UndoState.cs index 0a30f4b..5ed3c79 100644 --- a/OpenSim/Region/Framework/Scenes/UndoState.cs +++ b/OpenSim/Region/Framework/Scenes/UndoState.cs | |||
@@ -173,6 +173,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
173 | } | 173 | } |
174 | else | 174 | else |
175 | { | 175 | { |
176 | // Note: Updating these properties on sop automatically schedules an update if needed | ||
176 | if (Position != Vector3.Zero) | 177 | if (Position != Vector3.Zero) |
177 | { | 178 | { |
178 | // m_log.DebugFormat( | 179 | // m_log.DebugFormat( |
@@ -196,8 +197,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
196 | 197 | ||
197 | part.Resize(Scale); | 198 | part.Resize(Scale); |
198 | } | 199 | } |
199 | |||
200 | part.ScheduleTerseUpdate(); | ||
201 | } | 200 | } |
202 | 201 | ||
203 | part.Undoing = false; | 202 | part.Undoing = false; |
@@ -227,6 +226,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
227 | } | 226 | } |
228 | else | 227 | else |
229 | { | 228 | { |
229 | // Note: Updating these properties on sop automatically schedules an update if needed | ||
230 | if (Position != Vector3.Zero) | 230 | if (Position != Vector3.Zero) |
231 | part.OffsetPosition = Position; | 231 | part.OffsetPosition = Position; |
232 | 232 | ||
@@ -235,8 +235,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
235 | 235 | ||
236 | if (Scale != Vector3.Zero) | 236 | if (Scale != Vector3.Zero) |
237 | part.Resize(Scale); | 237 | part.Resize(Scale); |
238 | |||
239 | part.ScheduleTerseUpdate(); | ||
240 | } | 238 | } |
241 | 239 | ||
242 | part.Undoing = false; | 240 | part.Undoing = false; |