diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 67 |
1 files changed, 6 insertions, 61 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index b5c8cf2..080faeb 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -2506,24 +2506,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2506 | // don't backup while it's selected or you're asking for changes mid stream. | 2506 | // don't backup while it's selected or you're asking for changes mid stream. |
2507 | if (isTimeToPersist() || forcedBackup) | 2507 | if (isTimeToPersist() || forcedBackup) |
2508 | { | 2508 | { |
2509 | if (m_rootPart.PhysActor != null && | ||
2510 | (!m_rootPart.PhysActor.IsPhysical)) | ||
2511 | { | ||
2512 | // Possible ghost prim | ||
2513 | if (m_rootPart.PhysActor.Position != m_rootPart.GroupPosition) | ||
2514 | { | ||
2515 | foreach (SceneObjectPart part in m_parts.GetArray()) | ||
2516 | { | ||
2517 | // Re-set physics actor positions and | ||
2518 | // orientations | ||
2519 | part.GroupPosition = m_rootPart.GroupPosition; | ||
2520 | } | ||
2521 | } | ||
2522 | } | ||
2523 | // m_log.DebugFormat( | ||
2524 | // "[SCENE]: Storing {0}, {1} in {2}", | ||
2525 | // Name, UUID, m_scene.RegionInfo.RegionName); | ||
2526 | |||
2527 | if (RootPart.Shape.PCode == 9 && RootPart.Shape.State != 0) | 2509 | if (RootPart.Shape.PCode == 9 && RootPart.Shape.State != 0) |
2528 | { | 2510 | { |
2529 | RootPart.Shape.LastAttachPoint = RootPart.Shape.State; | 2511 | RootPart.Shape.LastAttachPoint = RootPart.Shape.State; |
@@ -2557,12 +2539,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2557 | backup_group.Clear(); | 2539 | backup_group.Clear(); |
2558 | backup_group = null; | 2540 | backup_group = null; |
2559 | } | 2541 | } |
2560 | // else | ||
2561 | // { | ||
2562 | // m_log.DebugFormat( | ||
2563 | // "[SCENE]: Did not update persistence of object {0} {1}, selected = {2}", | ||
2564 | // Name, UUID, IsSelected); | ||
2565 | // } | ||
2566 | } | 2542 | } |
2567 | } | 2543 | } |
2568 | catch (Exception e) | 2544 | catch (Exception e) |
@@ -2582,35 +2558,20 @@ namespace OpenSim.Region.Framework.Scenes | |||
2582 | /// Used when the client initially connects and when client sends RequestPrim packet | 2558 | /// Used when the client initially connects and when client sends RequestPrim packet |
2583 | /// </remarks> | 2559 | /// </remarks> |
2584 | /// <param name="remoteClient"></param> | 2560 | /// <param name="remoteClient"></param> |
2585 | public void SendFullUpdateToClient(IClientAPI remoteClient) | ||
2586 | { | ||
2587 | PrimUpdateFlags update = PrimUpdateFlags.FullUpdate; | ||
2588 | |||
2589 | RootPart.SendFullUpdate(remoteClient, update); | ||
2590 | |||
2591 | SceneObjectPart[] parts = m_parts.GetArray(); | ||
2592 | for (int i = 0; i < parts.Length; i++) | ||
2593 | { | ||
2594 | SceneObjectPart part = parts[i]; | ||
2595 | if (part != RootPart) | ||
2596 | part.SendFullUpdate(remoteClient, update); | ||
2597 | } | ||
2598 | } | ||
2599 | |||
2600 | public void SendFullAnimUpdateToClient(IClientAPI remoteClient) | 2561 | public void SendFullAnimUpdateToClient(IClientAPI remoteClient) |
2601 | { | 2562 | { |
2602 | PrimUpdateFlags update = PrimUpdateFlags.FullUpdate; | 2563 | PrimUpdateFlags update = PrimUpdateFlags.FullUpdate; |
2603 | if (RootPart.Shape.MeshFlagEntry) | 2564 | if (RootPart.Shape.MeshFlagEntry) |
2604 | update = PrimUpdateFlags.FullUpdatewithAnim; | 2565 | update = PrimUpdateFlags.FullUpdatewithAnim; |
2605 | 2566 | ||
2606 | RootPart.SendFullUpdate(remoteClient, update); | 2567 | RootPart.SendUpdate(remoteClient, update); |
2607 | 2568 | ||
2608 | SceneObjectPart[] parts = m_parts.GetArray(); | 2569 | SceneObjectPart[] parts = m_parts.GetArray(); |
2609 | for (int i = 0; i < parts.Length; i++) | 2570 | for (int i = 0; i < parts.Length; i++) |
2610 | { | 2571 | { |
2611 | SceneObjectPart part = parts[i]; | 2572 | SceneObjectPart part = parts[i]; |
2612 | if (part != RootPart) | 2573 | if (part != RootPart) |
2613 | part.SendFullUpdate(remoteClient, update); | 2574 | part.SendUpdate(remoteClient, update); |
2614 | } | 2575 | } |
2615 | } | 2576 | } |
2616 | 2577 | ||
@@ -3033,28 +2994,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
3033 | // the race conditions. | 2994 | // the race conditions. |
3034 | if (IsDeleted || inTransit) | 2995 | if (IsDeleted || inTransit) |
3035 | return; | 2996 | return; |
3036 | 2997 | ||
3037 | // Even temporary objects take part in physics (e.g. temp-on-rez bullets) | ||
3038 | //if ((RootPart.Flags & PrimFlags.TemporaryOnRez) != 0) | ||
3039 | // return; | ||
3040 | |||
3041 | // If we somehow got here to updating the SOG and its root part is not scheduled for update, | ||
3042 | // check to see if the physical position or rotation warrant an update. | ||
3043 | /* | ||
3044 | if (m_rootPart.UpdateFlag == UpdateRequired.NONE) | ||
3045 | { | ||
3046 | // rootpart SendScheduledUpdates will check if a update is needed | ||
3047 | m_rootPart.UpdateFlag = UpdateRequired.TERSE; | ||
3048 | } | ||
3049 | */ | ||
3050 | if (IsAttachment) | 2998 | if (IsAttachment) |
3051 | { | 2999 | { |
3052 | ScenePresence sp = m_scene.GetScenePresence(AttachedAvatar); | 3000 | ScenePresence sp = m_scene.GetScenePresence(AttachedAvatar); |
3053 | if (sp != null) | 3001 | if (sp != null) |
3054 | { | ||
3055 | sp.SendAttachmentScheduleUpdate(this); | 3002 | sp.SendAttachmentScheduleUpdate(this); |
3056 | return; | 3003 | return; |
3057 | } | ||
3058 | } | 3004 | } |
3059 | 3005 | ||
3060 | // while physics doesn't suports LookAt, we do it in RootPart | 3006 | // while physics doesn't suports LookAt, we do it in RootPart |
@@ -3134,13 +3080,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
3134 | } | 3080 | } |
3135 | } | 3081 | } |
3136 | 3082 | ||
3137 | RootPart.SendFullUpdateToAllClientsInternal(); | 3083 | RootPart.SendFullUpdateToAllClientsNoAttachment(); |
3138 | SceneObjectPart[] parts = m_parts.GetArray(); | 3084 | SceneObjectPart[] parts = m_parts.GetArray(); |
3139 | for (int i = 0; i < parts.Length; i++) | 3085 | for (int i = 0; i < parts.Length; i++) |
3140 | { | 3086 | { |
3141 | SceneObjectPart part = parts[i]; | 3087 | SceneObjectPart part = parts[i]; |
3142 | if (part != RootPart) | 3088 | if (part != RootPart) |
3143 | part.SendFullUpdateToAllClientsInternal(); | 3089 | part.SendFullUpdateToAllClientsNoAttachment(); |
3144 | } | 3090 | } |
3145 | } | 3091 | } |
3146 | 3092 | ||
@@ -5465,7 +5411,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
5465 | private string GetLinkNumber_lastname; | 5411 | private string GetLinkNumber_lastname; |
5466 | private int GetLinkNumber_lastnumber; | 5412 | private int GetLinkNumber_lastnumber; |
5467 | 5413 | ||
5468 | // this scales bad but so does GetLinkNumPart | ||
5469 | public int GetLinkNumber(string name) | 5414 | public int GetLinkNumber(string name) |
5470 | { | 5415 | { |
5471 | if(String.IsNullOrEmpty(name) || name == "Object" || name == "Primitive") | 5416 | if(String.IsNullOrEmpty(name) || name == "Object" || name == "Primitive") |