diff options
Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into careminster
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 48 |
1 files changed, 39 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 8717ed1..c47db97 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -726,6 +726,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
726 | m_isSelected = value; | 726 | m_isSelected = value; |
727 | // Tell physics engine that group is selected | 727 | // Tell physics engine that group is selected |
728 | 728 | ||
729 | // this is not right | ||
730 | // but ode engines should only really need to know about root part | ||
731 | // so they can put entire object simulation on hold and not colliding | ||
732 | // keep as was for now | ||
733 | |||
729 | PhysicsActor pa = m_rootPart.PhysActor; | 734 | PhysicsActor pa = m_rootPart.PhysActor; |
730 | if (pa != null) | 735 | if (pa != null) |
731 | { | 736 | { |
@@ -747,6 +752,40 @@ namespace OpenSim.Region.Framework.Scenes | |||
747 | } | 752 | } |
748 | } | 753 | } |
749 | 754 | ||
755 | public void PartSelectChanged(bool partSelect) | ||
756 | { | ||
757 | // any part selected makes group selected | ||
758 | if (m_isSelected == partSelect) | ||
759 | return; | ||
760 | |||
761 | if (partSelect) | ||
762 | { | ||
763 | IsSelected = partSelect; | ||
764 | // if (!IsAttachment) | ||
765 | // ScheduleGroupForFullUpdate(); | ||
766 | } | ||
767 | else | ||
768 | { | ||
769 | // bad bad bad 2 heavy for large linksets | ||
770 | // since viewer does send lot of (un)selects | ||
771 | // this needs to be replaced by a specific list or count ? | ||
772 | // but that will require extra code in several places | ||
773 | |||
774 | SceneObjectPart[] parts = m_parts.GetArray(); | ||
775 | for (int i = 0; i < parts.Length; i++) | ||
776 | { | ||
777 | SceneObjectPart part = parts[i]; | ||
778 | if (part.IsSelected) | ||
779 | return; | ||
780 | } | ||
781 | IsSelected = partSelect; | ||
782 | if (!IsAttachment) | ||
783 | { | ||
784 | ScheduleGroupForFullUpdate(); | ||
785 | } | ||
786 | } | ||
787 | } | ||
788 | |||
750 | private SceneObjectPart m_PlaySoundMasterPrim = null; | 789 | private SceneObjectPart m_PlaySoundMasterPrim = null; |
751 | public SceneObjectPart PlaySoundMasterPrim | 790 | public SceneObjectPart PlaySoundMasterPrim |
752 | { | 791 | { |
@@ -3161,14 +3200,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3161 | } | 3200 | } |
3162 | } | 3201 | } |
3163 | 3202 | ||
3164 | /* | ||
3165 | RootPart.UpdatePrimFlags(UsePhysics, SetTemporary, SetPhantom, SetVolumeDetect); | ||
3166 | for (int i = 0; i < parts.Length; i++) | ||
3167 | { | ||
3168 | if (parts[i] != RootPart) | ||
3169 | parts[i].UpdatePrimFlags(UsePhysics, SetTemporary, SetPhantom, SetVolumeDetect); | ||
3170 | } | ||
3171 | */ | ||
3172 | if (parts.Length > 1) | 3203 | if (parts.Length > 1) |
3173 | { | 3204 | { |
3174 | m_rootPart.UpdatePrimFlags(UsePhysics, SetTemporary, SetPhantom, SetVolumeDetect, true); | 3205 | m_rootPart.UpdatePrimFlags(UsePhysics, SetTemporary, SetPhantom, SetVolumeDetect, true); |
@@ -3185,7 +3216,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3185 | } | 3216 | } |
3186 | else | 3217 | else |
3187 | m_rootPart.UpdatePrimFlags(UsePhysics, SetTemporary, SetPhantom, SetVolumeDetect, false); | 3218 | m_rootPart.UpdatePrimFlags(UsePhysics, SetTemporary, SetPhantom, SetVolumeDetect, false); |
3188 | |||
3189 | } | 3219 | } |
3190 | } | 3220 | } |
3191 | 3221 | ||