aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs88
1 files changed, 21 insertions, 67 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 5951a92..014b007 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -377,6 +377,7 @@ namespace OpenSim.Region.Framework.Scenes
377 RootPart.ScriptSetPhysicsStatus(false); 377 RootPart.ScriptSetPhysicsStatus(false);
378 Scene.SimChat(Utils.StringToBytes("Hit Sandbox Limit"), 378 Scene.SimChat(Utils.StringToBytes("Hit Sandbox Limit"),
379 ChatTypeEnum.DebugChannel, 0x7FFFFFFF, RootPart.AbsolutePosition, Name, UUID, false); 379 ChatTypeEnum.DebugChannel, 0x7FFFFFFF, RootPart.AbsolutePosition, Name, UUID, false);
380 lockPartsForRead(false);
380 return; 381 return;
381 } 382 }
382 } 383 }
@@ -489,8 +490,8 @@ namespace OpenSim.Region.Framework.Scenes
489 private List<SceneObjectPart> m_PlaySoundSlavePrims = new List<SceneObjectPart>(); 490 private List<SceneObjectPart> m_PlaySoundSlavePrims = new List<SceneObjectPart>();
490 public List<SceneObjectPart> PlaySoundSlavePrims 491 public List<SceneObjectPart> PlaySoundSlavePrims
491 { 492 {
492 get { return m_LoopSoundSlavePrims; } 493 get { return m_PlaySoundSlavePrims; }
493 set { m_LoopSoundSlavePrims = value; } 494 set { m_PlaySoundSlavePrims = value; }
494 } 495 }
495 496
496 private SceneObjectPart m_LoopSoundMasterPrim = null; 497 private SceneObjectPart m_LoopSoundMasterPrim = null;
@@ -644,7 +645,7 @@ namespace OpenSim.Region.Framework.Scenes
644 ApplyPhysics(m_scene.m_physicalPrim); 645 ApplyPhysics(m_scene.m_physicalPrim);
645 646
646 // Don't trigger the update here - otherwise some client issues occur when multiple updates are scheduled 647 // Don't trigger the update here - otherwise some client issues occur when multiple updates are scheduled
647 // for the same object with very different properties. The caller must schedule the update. 648 // for the same object with very different properties. The caller must schedule the update.
648 //ScheduleGroupForFullUpdate(); 649 //ScheduleGroupForFullUpdate();
649 } 650 }
650 651
@@ -1369,21 +1370,20 @@ namespace OpenSim.Region.Framework.Scenes
1369 { 1370 {
1370// part.Inventory.RemoveScriptInstances(); 1371// part.Inventory.RemoveScriptInstances();
1371 1372
1372 ScenePresence[] avatars = Scene.GetScenePresences(); 1373 Scene.ForEachScenePresence(delegate (ScenePresence sp)
1373 for (int i = 0; i < avatars.Length; i++)
1374 { 1374 {
1375 if (avatars[i].ParentID == LocalId) 1375 if (sp.ParentID == LocalId)
1376 { 1376 {
1377 avatars[i].StandUp(); 1377 sp.StandUp();
1378 } 1378 }
1379 1379
1380 if (!silent) 1380 if (!silent)
1381 { 1381 {
1382 part.UpdateFlag = 0; 1382 part.UpdateFlag = 0;
1383 if (part == m_rootPart) 1383 if (part == m_rootPart)
1384 avatars[i].ControllingClient.SendKillObject(m_regionHandle, part.LocalId); 1384 sp.ControllingClient.SendKillObject(m_regionHandle, part.LocalId);
1385 } 1385 }
1386 } 1386 });
1387 1387
1388 } 1388 }
1389 1389
@@ -1605,11 +1605,10 @@ namespace OpenSim.Region.Framework.Scenes
1605 1605
1606 #endregion 1606 #endregion
1607 1607
1608 #region Client Updating
1609
1610 public void SendFullUpdateToClient(IClientAPI remoteClient) 1608 public void SendFullUpdateToClient(IClientAPI remoteClient)
1611 { 1609 {
1612 SendPartFullUpdate(remoteClient, RootPart, m_scene.Permissions.GenerateClientFlags(remoteClient.AgentId, RootPart.UUID)); 1610 RootPart.SendFullUpdate(
1611 remoteClient, m_scene.Permissions.GenerateClientFlags(remoteClient.AgentId, RootPart.UUID));
1613 1612
1614 lockPartsForRead(true); 1613 lockPartsForRead(true);
1615 { 1614 {
@@ -1617,42 +1616,12 @@ namespace OpenSim.Region.Framework.Scenes
1617 { 1616 {
1618 1617
1619 if (part != RootPart) 1618 if (part != RootPart)
1620 SendPartFullUpdate(remoteClient, part, m_scene.Permissions.GenerateClientFlags(remoteClient.AgentId, part.UUID)); 1619 part.SendFullUpdate(
1621 1620 remoteClient, m_scene.Permissions.GenerateClientFlags(remoteClient.AgentId, part.UUID));
1622 }
1623 }
1624 lockPartsForRead(false);
1625 }
1626
1627 /// <summary>
1628 /// Send a full update to the client for the given part
1629 /// </summary>
1630 /// <param name="remoteClient"></param>
1631 /// <param name="part"></param>
1632 internal void SendPartFullUpdate(IClientAPI remoteClient, SceneObjectPart part, uint clientFlags)
1633 {
1634// m_log.DebugFormat(
1635// "[SOG]: Sendinging part full update to {0} for {1} {2}", remoteClient.Name, part.Name, part.LocalId);
1636
1637 if (m_rootPart.UUID == part.UUID)
1638 {
1639 if (IsAttachment)
1640 {
1641 part.SendFullUpdateToClient(remoteClient, m_rootPart.AttachedPos, clientFlags);
1642 }
1643 else
1644 {
1645 part.SendFullUpdateToClient(remoteClient, AbsolutePosition, clientFlags);
1646 } 1621 }
1647 } 1622 }
1648 else
1649 {
1650 part.SendFullUpdateToClient(remoteClient, clientFlags);
1651 }
1652 } 1623 }
1653 1624
1654 #endregion
1655
1656 #region Copying 1625 #region Copying
1657 1626
1658 /// <summary> 1627 /// <summary>
@@ -2164,14 +2133,12 @@ namespace OpenSim.Region.Framework.Scenes
2164 public void ScheduleTerseUpdateToAvatar(ScenePresence presence) 2133 public void ScheduleTerseUpdateToAvatar(ScenePresence presence)
2165 { 2134 {
2166 lockPartsForRead(true); 2135 lockPartsForRead(true);
2136
2137 foreach (SceneObjectPart part in m_parts.Values)
2167 { 2138 {
2168 foreach (SceneObjectPart part in m_parts.Values) 2139 part.AddTerseUpdateToAvatar(presence);
2169 {
2170
2171 part.AddTerseUpdateToAvatar(presence);
2172
2173 }
2174 } 2140 }
2141
2175 lockPartsForRead(false); 2142 lockPartsForRead(false);
2176 } 2143 }
2177 2144
@@ -2203,21 +2170,12 @@ namespace OpenSim.Region.Framework.Scenes
2203 /// </summary> 2170 /// </summary>
2204 public void ScheduleGroupForTerseUpdate() 2171 public void ScheduleGroupForTerseUpdate()
2205 { 2172 {
2206<<<<<<< HEAD:OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
2207 lockPartsForRead(true); 2173 lockPartsForRead(true);
2208======= 2174 foreach (SceneObjectPart part in m_parts.Values)
2209// m_log.DebugFormat("[SOG]: Scheduling terse update for {0} {1}", Name, UUID);
2210
2211 lock (m_parts)
2212>>>>>>> 0.6.9-post-fixes:OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
2213 { 2175 {
2214 foreach (SceneObjectPart part in m_parts.Values) 2176 part.ScheduleTerseUpdate();
2215 {
2216
2217 part.ScheduleTerseUpdate();
2218
2219 }
2220 } 2177 }
2178
2221 lockPartsForRead(false); 2179 lockPartsForRead(false);
2222 } 2180 }
2223 2181
@@ -3071,8 +3029,8 @@ namespace OpenSim.Region.Framework.Scenes
3071 { 3029 {
3072 if (obPart.UUID != m_rootPart.UUID) 3030 if (obPart.UUID != m_rootPart.UUID)
3073 { 3031 {
3074 obPart.IgnoreUndoUpdate = true;
3075 Vector3 oldSize = new Vector3(obPart.Scale); 3032 Vector3 oldSize = new Vector3(obPart.Scale);
3033 obPart.IgnoreUndoUpdate = true;
3076 3034
3077 float f = 1.0f; 3035 float f = 1.0f;
3078 float a = 1.0f; 3036 float a = 1.0f;
@@ -3765,15 +3723,11 @@ namespace OpenSim.Region.Framework.Scenes
3765 3723
3766 HasGroupChanged = true; 3724 HasGroupChanged = true;
3767 } 3725 }
3768<<<<<<< HEAD:OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
3769 lockPartsForRead(false); 3726 lockPartsForRead(false);
3770 ScheduleGroupForFullUpdate();
3771=======
3772 3727
3773 // Don't trigger the update here - otherwise some client issues occur when multiple updates are scheduled 3728 // Don't trigger the update here - otherwise some client issues occur when multiple updates are scheduled
3774 // for the same object with very different properties. The caller must schedule the update. 3729 // for the same object with very different properties. The caller must schedule the update.
3775 //ScheduleGroupForFullUpdate(); 3730 //ScheduleGroupForFullUpdate();
3776>>>>>>> 0.6.9-post-fixes:OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
3777 } 3731 }
3778 3732
3779 public void TriggerScriptChangedEvent(Changed val) 3733 public void TriggerScriptChangedEvent(Changed val)