aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-11-03 20:12:10 +0000
committerJustin Clark-Casey (justincc)2011-11-03 20:12:10 +0000
commita62ccb5c4c24681a283ad236db2e4bd08fc5e1ec (patch)
treef26aa58d3a31ea6460a9cb76cc70a2ccb34945cc /OpenSim/Region
parentChange default say distance to 20m from 30m, the same as on the big grid. Th... (diff)
parentDrop the CopyTo parameter from Int32.MaxValue to 4096. This is a buffer size (diff)
downloadopensim-SC-a62ccb5c4c24681a283ad236db2e4bd08fc5e1ec.zip
opensim-SC-a62ccb5c4c24681a283ad236db2e4bd08fc5e1ec.tar.gz
opensim-SC-a62ccb5c4c24681a283ad236db2e4bd08fc5e1ec.tar.bz2
opensim-SC-a62ccb5c4c24681a283ad236db2e4bd08fc5e1ec.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs7
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs52
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs101
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs7
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs16
-rw-r--r--OpenSim/Region/Framework/Scenes/UndoState.cs6
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs15
14 files changed, 114 insertions, 110 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
index c07fc73..e4bacd4 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
@@ -332,7 +332,7 @@ namespace OpenSim.Region.ClientStack.Linden
332 332
333 grp.IsAttachment = false; 333 grp.IsAttachment = false;
334 // Required for linking 334 // Required for linking
335 grp.RootPart.UpdateFlag = 0; 335 grp.RootPart.ClearUpdateSchedule();
336 336
337 if (m_scene.Permissions.CanRezObject(1, avatar.UUID, pos)) 337 if (m_scene.Permissions.CanRezObject(1, avatar.UUID, pos))
338 { 338 {
@@ -345,8 +345,9 @@ namespace OpenSim.Region.ClientStack.Linden
345 345
346 for (int j = 1; j < allparts.Length; j++) 346 for (int j = 1; j < allparts.Length; j++)
347 { 347 {
348 rootGroup.RootPart.UpdateFlag = 0; 348 // Required for linking
349 allparts[j].RootPart.UpdateFlag = 0; 349 rootGroup.RootPart.ClearUpdateSchedule();
350 allparts[j].RootPart.ClearUpdateSchedule();
350 rootGroup.LinkToGroup(allparts[j]); 351 rootGroup.LinkToGroup(allparts[j]);
351 } 352 }
352 353
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
index 1da9aab..c952ebf 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
@@ -356,12 +356,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
356 PresenceInfo[] presences = PresenceService.GetAgents(new string[] { fid }); 356 PresenceInfo[] presences = PresenceService.GetAgents(new string[] { fid });
357 if (presences != null && presences.Length > 0) 357 if (presences != null && presences.Length > 0)
358 presence = presences[0]; 358 presence = presences[0];
359 if (presence != null) 359 im.offline = 0;
360 im.offline = 0;
361 360
362 im.fromAgentID = fromAgentID.Guid; 361 im.fromAgentID = fromAgentID.Guid;
363 im.fromAgentName = firstname + " " + lastname; 362 im.fromAgentName = firstname + " " + lastname;
364 im.offline = (byte)((presence == null) ? 1 : 0);
365 im.imSessionID = im.fromAgentID; 363 im.imSessionID = im.fromAgentID;
366 im.message = FriendshipMessage(fid); 364 im.message = FriendshipMessage(fid);
367 365
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs
index 8d055d4..de25048 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs
@@ -201,26 +201,42 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
201 201
202 private void UndeliveredMessage(GridInstantMessage im) 202 private void UndeliveredMessage(GridInstantMessage im)
203 { 203 {
204 if ((im.offline != 0) 204 if (im.dialog != (byte)InstantMessageDialog.MessageFromObject &&
205 && (!im.fromGroup || (im.fromGroup && m_ForwardOfflineGroupMessages))) 205 im.dialog != (byte)InstantMessageDialog.MessageFromAgent &&
206 im.dialog != (byte)InstantMessageDialog.GroupNotice &&
207 im.dialog != (byte)InstantMessageDialog.GroupInvitation &&
208 im.dialog != (byte)InstantMessageDialog.InventoryOffered)
206 { 209 {
207 bool success = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, bool>( 210 return;
208 "POST", m_RestURL+"/SaveMessage/", im); 211 }
209 212
210 if (im.dialog == (byte)InstantMessageDialog.MessageFromAgent) 213 if (!m_ForwardOfflineGroupMessages)
211 { 214 {
212 IClientAPI client = FindClient(new UUID(im.fromAgentID)); 215 if (im.dialog == (byte)InstantMessageDialog.GroupNotice ||
213 if (client == null) 216 im.dialog != (byte)InstantMessageDialog.GroupInvitation)
214 return; 217 return;
215 218 }
216 client.SendInstantMessage(new GridInstantMessage( 219
217 null, new UUID(im.toAgentID), 220 Scene scene = FindScene(new UUID(im.fromAgentID));
218 "System", new UUID(im.fromAgentID), 221 if (scene == null)
219 (byte)InstantMessageDialog.MessageFromAgent, 222 scene = m_SceneList[0];
220 "User is not logged in. "+ 223
221 (success ? "Message saved." : "Message not saved"), 224 bool success = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, bool>(
222 false, new Vector3())); 225 "POST", m_RestURL+"/SaveMessage/", im);
223 } 226
227 if (im.dialog == (byte)InstantMessageDialog.MessageFromAgent)
228 {
229 IClientAPI client = FindClient(new UUID(im.fromAgentID));
230 if (client == null)
231 return;
232
233 client.SendInstantMessage(new GridInstantMessage(
234 null, new UUID(im.toAgentID),
235 "System", new UUID(im.fromAgentID),
236 (byte)InstantMessageDialog.MessageFromAgent,
237 "User is not logged in. "+
238 (success ? "Message saved." : "Message not saved"),
239 false, new Vector3()));
224 } 240 }
225 } 241 }
226 } 242 }
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 7324b26..7251bd8 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -1714,7 +1714,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1714 //m_log.Debug(" >>> CrossPrimGroupIntoNewRegion <<<"); 1714 //m_log.Debug(" >>> CrossPrimGroupIntoNewRegion <<<");
1715 1715
1716 bool successYN = false; 1716 bool successYN = false;
1717 grp.RootPart.UpdateFlag = 0; 1717 grp.RootPart.ClearUpdateSchedule();
1718 //int primcrossingXMLmethod = 0; 1718 //int primcrossingXMLmethod = 0;
1719 1719
1720 if (destination != null) 1720 if (destination != null)
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index f012d72..dff43fd 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1494,7 +1494,7 @@ namespace OpenSim.Region.Framework.Scenes
1494 msg.fromAgentName = "Server"; 1494 msg.fromAgentName = "Server";
1495 msg.dialog = (byte)19; // Object msg 1495 msg.dialog = (byte)19; // Object msg
1496 msg.fromGroup = false; 1496 msg.fromGroup = false;
1497 msg.offline = (byte)1; 1497 msg.offline = (byte)0;
1498 msg.ParentEstateID = RegionInfo.EstateSettings.ParentEstateID; 1498 msg.ParentEstateID = RegionInfo.EstateSettings.ParentEstateID;
1499 msg.Position = Vector3.Zero; 1499 msg.Position = Vector3.Zero;
1500 msg.RegionID = RegionInfo.RegionID.Guid; 1500 msg.RegionID = RegionInfo.RegionID.Guid;
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 1af18e7..82ded28 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -1799,7 +1799,7 @@ namespace OpenSim.Region.Framework.Scenes
1799 newSet.RemoveAt(0); 1799 newSet.RemoveAt(0);
1800 1800
1801 foreach (SceneObjectPart newChild in newSet) 1801 foreach (SceneObjectPart newChild in newSet)
1802 newChild.UpdateFlag = 0; 1802 newChild.ClearUpdateSchedule();
1803 1803
1804 LinkObjects(newRoot, newSet); 1804 LinkObjects(newRoot, newSet);
1805 if (!affectedGroups.Contains(newRoot.ParentGroup)) 1805 if (!affectedGroups.Contains(newRoot.ParentGroup))
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 2ea9854..a0a7344 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -1157,7 +1157,7 @@ namespace OpenSim.Region.Framework.Scenes
1157 1157
1158 if (!silent) 1158 if (!silent)
1159 { 1159 {
1160 part.UpdateFlag = 0; 1160 part.ClearUpdateSchedule();
1161 if (part == m_rootPart) 1161 if (part == m_rootPart)
1162 { 1162 {
1163 if (!IsAttachment || (AttachedAvatar == avatar.ControllingClient.AgentId) || 1163 if (!IsAttachment || (AttachedAvatar == avatar.ControllingClient.AgentId) ||
@@ -1735,13 +1735,13 @@ namespace OpenSim.Region.Framework.Scenes
1735 1735
1736 if (UsePhysics && !AbsolutePosition.ApproxEquals(lastPhysGroupPos, 0.02f)) 1736 if (UsePhysics && !AbsolutePosition.ApproxEquals(lastPhysGroupPos, 0.02f))
1737 { 1737 {
1738 m_rootPart.UpdateFlag = 1; 1738 m_rootPart.UpdateFlag = UpdateRequired.TERSE;
1739 lastPhysGroupPos = AbsolutePosition; 1739 lastPhysGroupPos = AbsolutePosition;
1740 } 1740 }
1741 1741
1742 if (UsePhysics && !GroupRotation.ApproxEquals(lastPhysGroupRot, 0.1f)) 1742 if (UsePhysics && !GroupRotation.ApproxEquals(lastPhysGroupRot, 0.1f))
1743 { 1743 {
1744 m_rootPart.UpdateFlag = 1; 1744 m_rootPart.UpdateFlag = UpdateRequired.TERSE;
1745 lastPhysGroupRot = GroupRotation; 1745 lastPhysGroupRot = GroupRotation;
1746 } 1746 }
1747 1747
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index b68cc9f..44f822c 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -106,6 +106,13 @@ namespace OpenSim.Region.Framework.Scenes
106 SCULPT = 7 106 SCULPT = 7
107 } 107 }
108 108
109 public enum UpdateRequired : byte
110 {
111 NONE = 0,
112 TERSE = 1,
113 FULL = 2
114 }
115
109 #endregion Enumerations 116 #endregion Enumerations
110 117
111 public class SceneObjectPart : IScriptHost, ISceneEntity 118 public class SceneObjectPart : IScriptHost, ISceneEntity
@@ -254,15 +261,7 @@ namespace OpenSim.Region.Framework.Scenes
254 261
255 private bool m_passTouches; 262 private bool m_passTouches;
256 263
257 /// <summary> 264 private UpdateRequired m_updateFlag;
258 /// Only used internally to schedule client updates.
259 /// 0 - no update is scheduled
260 /// 1 - terse update scheduled
261 /// 2 - full update scheduled
262 ///
263 /// TODO - This should be an enumeration
264 /// </summary>
265 private byte m_updateFlag;
266 265
267 private PhysicsActor m_physActor; 266 private PhysicsActor m_physActor;
268 protected Vector3 m_acceleration; 267 protected Vector3 m_acceleration;
@@ -884,7 +883,15 @@ namespace OpenSim.Region.Framework.Scenes
884 } 883 }
885 } 884 }
886 885
887 /// <summary></summary> 886 /// <summary>Update angular velocity and schedule terse update.</summary>
887 public void UpdateAngularVelocity(Vector3 avel)
888 {
889 AngularVelocity = avel;
890 ScheduleTerseUpdate();
891 ParentGroup.HasGroupChanged = true;
892 }
893
894 /// <summary>Get or set angular velocity. Does not schedule update.</summary>
888 public Vector3 AngularVelocity 895 public Vector3 AngularVelocity
889 { 896 {
890 get 897 get
@@ -1023,8 +1030,8 @@ namespace OpenSim.Region.Framework.Scenes
1023 TriggerScriptChangedEvent(Changed.SCALE); 1030 TriggerScriptChangedEvent(Changed.SCALE);
1024 } 1031 }
1025 } 1032 }
1026 1033
1027 public byte UpdateFlag 1034 public UpdateRequired UpdateFlag
1028 { 1035 {
1029 get { return m_updateFlag; } 1036 get { return m_updateFlag; }
1030 set { m_updateFlag = value; } 1037 set { m_updateFlag = value; }
@@ -1309,9 +1316,9 @@ namespace OpenSim.Region.Framework.Scenes
1309 /// <summary> 1316 /// <summary>
1310 /// Clear all pending updates of parts to clients 1317 /// Clear all pending updates of parts to clients
1311 /// </summary> 1318 /// </summary>
1312 private void ClearUpdateSchedule() 1319 public void ClearUpdateSchedule()
1313 { 1320 {
1314 m_updateFlag = 0; 1321 UpdateFlag = UpdateRequired.NONE;
1315 } 1322 }
1316 1323
1317 /// <summary> 1324 /// <summary>
@@ -2829,7 +2836,7 @@ namespace OpenSim.Region.Framework.Scenes
2829 TimeStampFull = (uint)timeNow; 2836 TimeStampFull = (uint)timeNow;
2830 } 2837 }
2831 2838
2832 m_updateFlag = 2; 2839 UpdateFlag = UpdateRequired.FULL;
2833 2840
2834 // m_log.DebugFormat( 2841 // m_log.DebugFormat(
2835 // "[SCENE OBJECT PART]: Scheduling full update for {0}, {1} at {2}", 2842 // "[SCENE OBJECT PART]: Scheduling full update for {0}, {1} at {2}",
@@ -2845,13 +2852,13 @@ namespace OpenSim.Region.Framework.Scenes
2845 if (m_parentGroup == null) 2852 if (m_parentGroup == null)
2846 return; 2853 return;
2847 2854
2848 if (m_updateFlag < 1) 2855 if (UpdateFlag == UpdateRequired.NONE)
2849 { 2856 {
2850 m_parentGroup.HasGroupChanged = true; 2857 m_parentGroup.HasGroupChanged = true;
2851 m_parentGroup.QueueForUpdateCheck(); 2858 m_parentGroup.QueueForUpdateCheck();
2852 2859
2853 TimeStampTerse = (uint) Util.UnixTimeSinceEpoch(); 2860 TimeStampTerse = (uint) Util.UnixTimeSinceEpoch();
2854 m_updateFlag = 1; 2861 UpdateFlag = UpdateRequired.TERSE;
2855 2862
2856 // m_log.DebugFormat( 2863 // m_log.DebugFormat(
2857 // "[SCENE OBJECT PART]: Scheduling terse update for {0}, {1} at {2}", 2864 // "[SCENE OBJECT PART]: Scheduling terse update for {0}, {1} at {2}",
@@ -3018,45 +3025,39 @@ namespace OpenSim.Region.Framework.Scenes
3018 const float POSITION_TOLERANCE = 0.05f; 3025 const float POSITION_TOLERANCE = 0.05f;
3019 const int TIME_MS_TOLERANCE = 3000; 3026 const int TIME_MS_TOLERANCE = 3000;
3020 3027
3021 if (m_updateFlag == 1) 3028 switch (UpdateFlag)
3022 { 3029 {
3023 // Throw away duplicate or insignificant updates 3030 case UpdateRequired.TERSE:
3024 if (!RotationOffset.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) ||
3025 !Acceleration.Equals(m_lastAcceleration) ||
3026 !Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) ||
3027 Velocity.ApproxEquals(Vector3.Zero, VELOCITY_TOLERANCE) ||
3028 !AngularVelocity.ApproxEquals(m_lastAngularVelocity, VELOCITY_TOLERANCE) ||
3029 !OffsetPosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) ||
3030 Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE)
3031 { 3031 {
3032 AddTerseUpdateToAllAvatars(); 3032 // Throw away duplicate or insignificant updates
3033 ClearUpdateSchedule(); 3033 if (!RotationOffset.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) ||
3034 3034 !Acceleration.Equals(m_lastAcceleration) ||
3035 // This causes the Scene to 'poll' physical objects every couple of frames 3035 !Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) ||
3036 // bad, so it's been replaced by an event driven method. 3036 Velocity.ApproxEquals(Vector3.Zero, VELOCITY_TOLERANCE) ||
3037 //if ((ObjectFlags & (uint)PrimFlags.Physics) != 0) 3037 !AngularVelocity.ApproxEquals(m_lastAngularVelocity, VELOCITY_TOLERANCE) ||
3038 //{ 3038 !OffsetPosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) ||
3039 // Only send the constant terse updates on physical objects! 3039 Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE)
3040 //ScheduleTerseUpdate(); 3040 {
3041 //} 3041 AddTerseUpdateToAllAvatars();
3042 3042 ClearUpdateSchedule();
3043 // Update the "last" values 3043
3044 m_lastPosition = OffsetPosition; 3044 // Update the "last" values
3045 m_lastRotation = RotationOffset; 3045 m_lastPosition = OffsetPosition;
3046 m_lastVelocity = Velocity; 3046 m_lastRotation = RotationOffset;
3047 m_lastAcceleration = Acceleration; 3047 m_lastVelocity = Velocity;
3048 m_lastAngularVelocity = AngularVelocity; 3048 m_lastAcceleration = Acceleration;
3049 m_lastTerseSent = Environment.TickCount; 3049 m_lastAngularVelocity = AngularVelocity;
3050 m_lastTerseSent = Environment.TickCount;
3051 }
3052 break;
3050 } 3053 }
3051 } 3054 case UpdateRequired.FULL:
3052 else
3053 {
3054 if (m_updateFlag == 2) // is a new prim, just created/reloaded or has major changes
3055 { 3055 {
3056 AddFullUpdateToAllAvatars(); 3056 AddFullUpdateToAllAvatars();
3057 ClearUpdateSchedule(); 3057 break;
3058 } 3058 }
3059 } 3059 }
3060
3060 ClearUpdateSchedule(); 3061 ClearUpdateSchedule();
3061 } 3062 }
3062 3063
@@ -3436,7 +3437,7 @@ namespace OpenSim.Region.Framework.Scenes
3436 _groupID = groupID; 3437 _groupID = groupID;
3437 if (client != null) 3438 if (client != null)
3438 SendPropertiesToClient(client); 3439 SendPropertiesToClient(client);
3439 m_updateFlag = 2; 3440 UpdateFlag = UpdateRequired.FULL;
3440 } 3441 }
3441 3442
3442 /// <summary> 3443 /// <summary>
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 3e3fb0f..1d77b06 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3212,7 +3212,7 @@ namespace OpenSim.Region.Framework.Scenes
3212 foreach (ISceneObject so in cAgent.AttachmentObjects) 3212 foreach (ISceneObject so in cAgent.AttachmentObjects)
3213 { 3213 {
3214 ((SceneObjectGroup)so).LocalId = 0; 3214 ((SceneObjectGroup)so).LocalId = 0;
3215 ((SceneObjectGroup)so).RootPart.UpdateFlag = 0; 3215 ((SceneObjectGroup)so).RootPart.ClearUpdateSchedule();
3216 so.SetState(cAgent.AttachmentObjectStates[i++], m_scene); 3216 so.SetState(cAgent.AttachmentObjectStates[i++], m_scene);
3217 m_scene.IncomingCreateObject(so); 3217 m_scene.IncomingCreateObject(so);
3218 } 3218 }
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index e06a222..60cc788 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);
@@ -584,11 +583,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
584 obj.Scale = Util.ReadVector(reader, "Scale"); 583 obj.Scale = Util.ReadVector(reader, "Scale");
585 } 584 }
586 585
587 private static void ProcessUpdateFlag(SceneObjectPart obj, XmlTextReader reader)
588 {
589 obj.UpdateFlag = (byte)reader.ReadElementContentAsInt("UpdateFlag", String.Empty);
590 }
591
592 private static void ProcessSitTargetOrientation(SceneObjectPart obj, XmlTextReader reader) 586 private static void ProcessSitTargetOrientation(SceneObjectPart obj, XmlTextReader reader)
593 { 587 {
594 obj.SitTargetOrientation = Util.ReadQuaternion(reader, "SitTargetOrientation"); 588 obj.SitTargetOrientation = Util.ReadQuaternion(reader, "SitTargetOrientation");
@@ -1187,7 +1181,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1187 WriteShape(writer, sop.Shape, options); 1181 WriteShape(writer, sop.Shape, options);
1188 1182
1189 WriteVector(writer, "Scale", sop.Scale); 1183 WriteVector(writer, "Scale", sop.Scale);
1190 writer.WriteElementString("UpdateFlag", sop.UpdateFlag.ToString());
1191 WriteQuaternion(writer, "SitTargetOrientation", sop.SitTargetOrientation); 1184 WriteQuaternion(writer, "SitTargetOrientation", sop.SitTargetOrientation);
1192 WriteVector(writer, "SitTargetPosition", sop.SitTargetPosition); 1185 WriteVector(writer, "SitTargetPosition", sop.SitTargetPosition);
1193 WriteVector(writer, "SitTargetPositionLL", sop.SitTargetPositionLL); 1186 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 d34d8e5..860172c 100644
--- a/OpenSim/Region/Framework/Scenes/UndoState.cs
+++ b/OpenSim/Region/Framework/Scenes/UndoState.cs
@@ -158,6 +158,7 @@ namespace OpenSim.Region.Framework.Scenes
158 } 158 }
159 else 159 else
160 { 160 {
161 // Note: Updating these properties on sop automatically schedules an update if needed
161 if (Position != Vector3.Zero) 162 if (Position != Vector3.Zero)
162 { 163 {
163// m_log.DebugFormat( 164// m_log.DebugFormat(
@@ -181,8 +182,6 @@ namespace OpenSim.Region.Framework.Scenes
181 182
182 part.Resize(Scale); 183 part.Resize(Scale);
183 } 184 }
184
185 part.ScheduleTerseUpdate();
186 } 185 }
187 186
188 part.Undoing = false; 187 part.Undoing = false;
@@ -212,6 +211,7 @@ namespace OpenSim.Region.Framework.Scenes
212 } 211 }
213 else 212 else
214 { 213 {
214 // Note: Updating these properties on sop automatically schedules an update if needed
215 if (Position != Vector3.Zero) 215 if (Position != Vector3.Zero)
216 part.OffsetPosition = Position; 216 part.OffsetPosition = Position;
217 217
@@ -220,8 +220,6 @@ namespace OpenSim.Region.Framework.Scenes
220 220
221 if (Scale != Vector3.Zero) 221 if (Scale != Vector3.Zero)
222 part.Resize(Scale); 222 part.Resize(Scale);
223
224 part.ScheduleTerseUpdate();
225 } 223 }
226 224
227 part.Undoing = false; 225 part.Undoing = false;
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
index b2c0f48..d452905 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
@@ -881,7 +881,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
881 msg.dialog = dialog; 881 msg.dialog = dialog;
882 // msg.dialog = (byte)OpenMetaverse.InstantMessageDialog.GroupNotice; 882 // msg.dialog = (byte)OpenMetaverse.InstantMessageDialog.GroupNotice;
883 msg.fromGroup = true; 883 msg.fromGroup = true;
884 msg.offline = (byte)1; // Allow this message to be stored for offline use 884 msg.offline = (byte)0;
885 msg.ParentEstateID = 0; 885 msg.ParentEstateID = 0;
886 msg.Position = Vector3.Zero; 886 msg.Position = Vector3.Zero;
887 msg.RegionID = UUID.Zero.Guid; 887 msg.RegionID = UUID.Zero.Guid;
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index a51a88b..0750579 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3351,10 +3351,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3351 3351
3352 protected void TargetOmega(SceneObjectPart part, LSL_Vector axis, double spinrate, double gain) 3352 protected void TargetOmega(SceneObjectPart part, LSL_Vector axis, double spinrate, double gain)
3353 { 3353 {
3354 part.AngularVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)); 3354 part.UpdateAngularVelocity(new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)));
3355 part.ScheduleTerseUpdate();
3356 part.SendTerseUpdateToAllClients();
3357 part.ParentGroup.HasGroupChanged = true;
3358 } 3355 }
3359 3356
3360 public LSL_Integer llGetStartParameter() 3357 public LSL_Integer llGetStartParameter()
@@ -3616,11 +3613,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3616 parentPrim = targetPart.ParentGroup; 3613 parentPrim = targetPart.ParentGroup;
3617 childPrim = m_host.ParentGroup; 3614 childPrim = m_host.ParentGroup;
3618 } 3615 }
3619// byte uf = childPrim.RootPart.UpdateFlag; 3616
3620 childPrim.RootPart.UpdateFlag = 0; 3617 // Required for linking
3618 childPrim.RootPart.ClearUpdateSchedule();
3621 parentPrim.LinkToGroup(childPrim); 3619 parentPrim.LinkToGroup(childPrim);
3622// if (uf != (Byte)0)
3623// parent.RootPart.UpdateFlag = uf;
3624 } 3620 }
3625 3621
3626 parentPrim.TriggerScriptChangedEvent(Changed.LINK); 3622 parentPrim.TriggerScriptChangedEvent(Changed.LINK);
@@ -3701,7 +3697,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3701 parts.Remove(newRoot); 3697 parts.Remove(newRoot);
3702 foreach (SceneObjectPart part in parts) 3698 foreach (SceneObjectPart part in parts)
3703 { 3699 {
3704 part.UpdateFlag = 0; 3700 // Required for linking
3701 part.ClearUpdateSchedule();
3705 newRoot.ParentGroup.LinkToGroup(part.ParentGroup); 3702 newRoot.ParentGroup.LinkToGroup(part.ParentGroup);
3706 } 3703 }
3707 newRoot.ParentGroup.HasGroupChanged = true; 3704 newRoot.ParentGroup.HasGroupChanged = true;