diff options
author | UbitUmarov | 2014-10-26 01:25:28 +0000 |
---|---|---|
committer | UbitUmarov | 2014-10-26 01:25:28 +0000 |
commit | 139044fc79844b455574fd0be7baa1bab9bf78d9 (patch) | |
tree | 9ef526f2863f1b2aaf407be91a5806f7fec741a9 /OpenSim/Region/Framework/Scenes | |
parent | some cleanup, localID coerence fix.. (diff) | |
download | opensim-SC_OLD-139044fc79844b455574fd0be7baa1bab9bf78d9.zip opensim-SC_OLD-139044fc79844b455574fd0be7baa1bab9bf78d9.tar.gz opensim-SC_OLD-139044fc79844b455574fd0be7baa1bab9bf78d9.tar.bz2 opensim-SC_OLD-139044fc79844b455574fd0be7baa1bab9bf78d9.tar.xz |
keep intransit flag even if deleted, dont set sog position if in transit
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 79 |
1 files changed, 38 insertions, 41 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index dea8f3e..9f2a689 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -529,7 +529,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
529 | set | 529 | set |
530 | { | 530 | { |
531 | Vector3 val = value; | 531 | Vector3 val = value; |
532 | 532 | ||
533 | if (Scene != null && !inTransit) | 533 | if (Scene != null && !inTransit) |
534 | { | 534 | { |
535 | if ( | 535 | if ( |
@@ -552,54 +552,55 @@ namespace OpenSim.Region.Framework.Scenes | |||
552 | d.BeginInvoke(this, val, CrossAsyncCompleted, d); | 552 | d.BeginInvoke(this, val, CrossAsyncCompleted, d); |
553 | return; | 553 | return; |
554 | } | 554 | } |
555 | } | ||
556 | 555 | ||
557 | if (RootPart.GetStatusSandbox()) | 556 | |
558 | { | 557 | if (RootPart.GetStatusSandbox()) |
559 | if (Util.GetDistanceTo(RootPart.StatusSandboxPos, value) > 10) | ||
560 | { | 558 | { |
561 | RootPart.ScriptSetPhysicsStatus(false); | 559 | if (Util.GetDistanceTo(RootPart.StatusSandboxPos, value) > 10) |
562 | 560 | { | |
563 | if (Scene != null) | 561 | RootPart.ScriptSetPhysicsStatus(false); |
564 | Scene.SimChat(Utils.StringToBytes("Hit Sandbox Limit"), | ||
565 | ChatTypeEnum.DebugChannel, 0x7FFFFFFF, RootPart.AbsolutePosition, Name, UUID, false); | ||
566 | |||
567 | return; | ||
568 | } | ||
569 | } | ||
570 | 562 | ||
571 | bool triggerScriptEvent = m_rootPart.GroupPosition != val; | 563 | if (Scene != null) |
572 | if (m_dupeInProgress || IsDeleted) | 564 | Scene.SimChat(Utils.StringToBytes("Hit Sandbox Limit"), |
573 | triggerScriptEvent = false; | 565 | ChatTypeEnum.DebugChannel, 0x7FFFFFFF, RootPart.AbsolutePosition, Name, UUID, false); |
574 | 566 | ||
575 | m_rootPart.GroupPosition = val; | 567 | return; |
568 | } | ||
569 | } | ||
576 | 570 | ||
577 | // Restuff the new GroupPosition into each child SOP of the linkset. | 571 | bool triggerScriptEvent = m_rootPart.GroupPosition != val; |
578 | // this is needed because physics may not have linksets but just loose SOPs in world | 572 | if (m_dupeInProgress || IsDeleted) |
573 | triggerScriptEvent = false; | ||
579 | 574 | ||
580 | SceneObjectPart[] parts = m_parts.GetArray(); | 575 | m_rootPart.GroupPosition = val; |
581 | 576 | ||
582 | foreach (SceneObjectPart part in parts) | 577 | // Restuff the new GroupPosition into each child SOP of the linkset. |
583 | { | 578 | // this is needed because physics may not have linksets but just loose SOPs in world |
584 | if (part != m_rootPart) | ||
585 | part.GroupPosition = val; | ||
586 | } | ||
587 | 579 | ||
588 | foreach (ScenePresence av in m_linkedAvatars) | 580 | SceneObjectPart[] parts = m_parts.GetArray(); |
589 | { | ||
590 | av.sitSOGmoved(); | ||
591 | } | ||
592 | 581 | ||
593 | // now that position is changed tell it to scripts | ||
594 | if (triggerScriptEvent) | ||
595 | { | ||
596 | foreach (SceneObjectPart part in parts) | 582 | foreach (SceneObjectPart part in parts) |
597 | { | 583 | { |
598 | part.TriggerScriptChangedEvent(Changed.POSITION); | 584 | if (part != m_rootPart) |
585 | part.GroupPosition = val; | ||
599 | } | 586 | } |
587 | |||
588 | foreach (ScenePresence av in m_linkedAvatars) | ||
589 | { | ||
590 | av.sitSOGmoved(); | ||
591 | } | ||
592 | |||
593 | // now that position is changed tell it to scripts | ||
594 | if (triggerScriptEvent) | ||
595 | { | ||
596 | foreach (SceneObjectPart part in parts) | ||
597 | { | ||
598 | part.TriggerScriptChangedEvent(Changed.POSITION); | ||
599 | } | ||
600 | } | ||
601 | |||
602 | Scene.EventManager.TriggerParcelPrimCountTainted(); | ||
600 | } | 603 | } |
601 | |||
602 | Scene.EventManager.TriggerParcelPrimCountTainted(); | ||
603 | } | 604 | } |
604 | } | 605 | } |
605 | 606 | ||
@@ -751,11 +752,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
751 | SOGCrossDelegate icon = (SOGCrossDelegate)iar.AsyncState; | 752 | SOGCrossDelegate icon = (SOGCrossDelegate)iar.AsyncState; |
752 | SceneObjectGroup sog = icon.EndInvoke(iar); | 753 | SceneObjectGroup sog = icon.EndInvoke(iar); |
753 | 754 | ||
754 | if (sog.IsDeleted) | 755 | if (!sog.IsDeleted) |
755 | { | ||
756 | sog.inTransit = false; // just in case... | ||
757 | } | ||
758 | else | ||
759 | { | 756 | { |
760 | SceneObjectPart rootp = sog.m_rootPart; | 757 | SceneObjectPart rootp = sog.m_rootPart; |
761 | Vector3 oldp = rootp.GroupPosition; | 758 | Vector3 oldp = rootp.GroupPosition; |