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.cs78
1 files changed, 21 insertions, 57 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 13d1d4e..84c3719 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -418,6 +418,7 @@ namespace OpenSim.Region.Framework.Scenes
418 RootPart.ScriptSetPhysicsStatus(false); 418 RootPart.ScriptSetPhysicsStatus(false);
419 Scene.SimChat(Utils.StringToBytes("Hit Sandbox Limit"), 419 Scene.SimChat(Utils.StringToBytes("Hit Sandbox Limit"),
420 ChatTypeEnum.DebugChannel, 0x7FFFFFFF, RootPart.AbsolutePosition, Name, UUID, false); 420 ChatTypeEnum.DebugChannel, 0x7FFFFFFF, RootPart.AbsolutePosition, Name, UUID, false);
421 lockPartsForRead(false);
421 return; 422 return;
422 } 423 }
423 } 424 }
@@ -530,8 +531,8 @@ namespace OpenSim.Region.Framework.Scenes
530 private List<SceneObjectPart> m_PlaySoundSlavePrims = new List<SceneObjectPart>(); 531 private List<SceneObjectPart> m_PlaySoundSlavePrims = new List<SceneObjectPart>();
531 public List<SceneObjectPart> PlaySoundSlavePrims 532 public List<SceneObjectPart> PlaySoundSlavePrims
532 { 533 {
533 get { return m_LoopSoundSlavePrims; } 534 get { return m_PlaySoundSlavePrims; }
534 set { m_LoopSoundSlavePrims = value; } 535 set { m_PlaySoundSlavePrims = value; }
535 } 536 }
536 537
537 private SceneObjectPart m_LoopSoundMasterPrim = null; 538 private SceneObjectPart m_LoopSoundMasterPrim = null;
@@ -686,7 +687,7 @@ namespace OpenSim.Region.Framework.Scenes
686 ApplyPhysics(m_scene.m_physicalPrim); 687 ApplyPhysics(m_scene.m_physicalPrim);
687 688
688 // Don't trigger the update here - otherwise some client issues occur when multiple updates are scheduled 689 // Don't trigger the update here - otherwise some client issues occur when multiple updates are scheduled
689 // for the same object with very different properties. The caller must schedule the update. 690 // for the same object with very different properties. The caller must schedule the update.
690 //ScheduleGroupForFullUpdate(); 691 //ScheduleGroupForFullUpdate();
691 } 692 }
692 693
@@ -1411,21 +1412,20 @@ namespace OpenSim.Region.Framework.Scenes
1411 { 1412 {
1412// part.Inventory.RemoveScriptInstances(); 1413// part.Inventory.RemoveScriptInstances();
1413 1414
1414 ScenePresence[] avatars = Scene.GetScenePresences(); 1415 Scene.ForEachScenePresence(delegate (ScenePresence sp)
1415 for (int i = 0; i < avatars.Length; i++)
1416 { 1416 {
1417 if (avatars[i].ParentID == LocalId) 1417 if (sp.ParentID == LocalId)
1418 { 1418 {
1419 avatars[i].StandUp(); 1419 sp.StandUp();
1420 } 1420 }
1421 1421
1422 if (!silent) 1422 if (!silent)
1423 { 1423 {
1424 part.UpdateFlag = 0; 1424 part.UpdateFlag = 0;
1425 if (part == m_rootPart) 1425 if (part == m_rootPart)
1426 avatars[i].ControllingClient.SendKillObject(m_regionHandle, part.LocalId); 1426 sp.ControllingClient.SendKillObject(m_regionHandle, part.LocalId);
1427 } 1427 }
1428 } 1428 });
1429 1429
1430 } 1430 }
1431 1431
@@ -1647,11 +1647,10 @@ namespace OpenSim.Region.Framework.Scenes
1647 1647
1648 #endregion 1648 #endregion
1649 1649
1650 #region Client Updating
1651
1652 public void SendFullUpdateToClient(IClientAPI remoteClient) 1650 public void SendFullUpdateToClient(IClientAPI remoteClient)
1653 { 1651 {
1654 SendPartFullUpdate(remoteClient, RootPart, m_scene.Permissions.GenerateClientFlags(remoteClient.AgentId, RootPart.UUID)); 1652 RootPart.SendFullUpdate(
1653 remoteClient, m_scene.Permissions.GenerateClientFlags(remoteClient.AgentId, RootPart.UUID));
1655 1654
1656 lockPartsForRead(true); 1655 lockPartsForRead(true);
1657 { 1656 {
@@ -1659,42 +1658,12 @@ namespace OpenSim.Region.Framework.Scenes
1659 { 1658 {
1660 1659
1661 if (part != RootPart) 1660 if (part != RootPart)
1662 SendPartFullUpdate(remoteClient, part, m_scene.Permissions.GenerateClientFlags(remoteClient.AgentId, part.UUID)); 1661 part.SendFullUpdate(
1663 1662 remoteClient, m_scene.Permissions.GenerateClientFlags(remoteClient.AgentId, part.UUID));
1664 }
1665 }
1666 lockPartsForRead(false);
1667 }
1668
1669 /// <summary>
1670 /// Send a full update to the client for the given part
1671 /// </summary>
1672 /// <param name="remoteClient"></param>
1673 /// <param name="part"></param>
1674 internal void SendPartFullUpdate(IClientAPI remoteClient, SceneObjectPart part, uint clientFlags)
1675 {
1676// m_log.DebugFormat(
1677// "[SOG]: Sendinging part full update to {0} for {1} {2}", remoteClient.Name, part.Name, part.LocalId);
1678
1679 if (m_rootPart.UUID == part.UUID)
1680 {
1681 if (IsAttachment)
1682 {
1683 part.SendFullUpdateToClient(remoteClient, m_rootPart.AttachedPos, clientFlags);
1684 }
1685 else
1686 {
1687 part.SendFullUpdateToClient(remoteClient, AbsolutePosition, clientFlags);
1688 } 1663 }
1689 } 1664 }
1690 else
1691 {
1692 part.SendFullUpdateToClient(remoteClient, clientFlags);
1693 }
1694 } 1665 }
1695 1666
1696 #endregion
1697
1698 #region Copying 1667 #region Copying
1699 1668
1700 /// <summary> 1669 /// <summary>
@@ -2206,14 +2175,12 @@ namespace OpenSim.Region.Framework.Scenes
2206 public void ScheduleTerseUpdateToAvatar(ScenePresence presence) 2175 public void ScheduleTerseUpdateToAvatar(ScenePresence presence)
2207 { 2176 {
2208 lockPartsForRead(true); 2177 lockPartsForRead(true);
2178
2179 foreach (SceneObjectPart part in m_parts.Values)
2209 { 2180 {
2210 foreach (SceneObjectPart part in m_parts.Values) 2181 part.AddTerseUpdateToAvatar(presence);
2211 {
2212
2213 part.AddTerseUpdateToAvatar(presence);
2214
2215 }
2216 } 2182 }
2183
2217 lockPartsForRead(false); 2184 lockPartsForRead(false);
2218 } 2185 }
2219 2186
@@ -2246,14 +2213,11 @@ namespace OpenSim.Region.Framework.Scenes
2246 public void ScheduleGroupForTerseUpdate() 2213 public void ScheduleGroupForTerseUpdate()
2247 { 2214 {
2248 lockPartsForRead(true); 2215 lockPartsForRead(true);
2216 foreach (SceneObjectPart part in m_parts.Values)
2249 { 2217 {
2250 foreach (SceneObjectPart part in m_parts.Values) 2218 part.ScheduleTerseUpdate();
2251 {
2252
2253 part.ScheduleTerseUpdate();
2254
2255 }
2256 } 2219 }
2220
2257 lockPartsForRead(false); 2221 lockPartsForRead(false);
2258 } 2222 }
2259 2223
@@ -3107,8 +3071,8 @@ namespace OpenSim.Region.Framework.Scenes
3107 { 3071 {
3108 if (obPart.UUID != m_rootPart.UUID) 3072 if (obPart.UUID != m_rootPart.UUID)
3109 { 3073 {
3110 obPart.IgnoreUndoUpdate = true;
3111 Vector3 oldSize = new Vector3(obPart.Scale); 3074 Vector3 oldSize = new Vector3(obPart.Scale);
3075 obPart.IgnoreUndoUpdate = true;
3112 3076
3113 float f = 1.0f; 3077 float f = 1.0f;
3114 float a = 1.0f; 3078 float a = 1.0f;