aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-07-16 04:49:21 +0100
committerJustin Clark-Casey (justincc)2011-07-16 04:49:21 +0100
commit9a80adf33ae0d255d923d33f5b6abac540efcd52 (patch)
treea02aa30115880e2ccf5ae179ef0e2487f7c120cd /OpenSim/Region
parentrefactor: replace scale limiting code with more elegant Math.Min calls (diff)
downloadopensim-SC_OLD-9a80adf33ae0d255d923d33f5b6abac540efcd52.zip
opensim-SC_OLD-9a80adf33ae0d255d923d33f5b6abac540efcd52.tar.gz
opensim-SC_OLD-9a80adf33ae0d255d923d33f5b6abac540efcd52.tar.bz2
opensim-SC_OLD-9a80adf33ae0d255d923d33f5b6abac540efcd52.tar.xz
remove now unncessary parts of SceneObjectGroup.Resize()
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs26
1 files changed, 5 insertions, 21 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 477b3e3..7662874 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -2611,6 +2611,7 @@ namespace OpenSim.Region.Framework.Scenes
2611 2611
2612 #region Resize 2612 #region Resize
2613 2613
2614
2614 /// <summary> 2615 /// <summary>
2615 /// Resize the entire group of prims. 2616 /// Resize the entire group of prims.
2616 /// </summary> 2617 /// </summary>
@@ -2712,6 +2713,7 @@ namespace OpenSim.Region.Framework.Scenes
2712 z *= a; 2713 z *= a;
2713 } 2714 }
2714 } 2715 }
2716
2715 obPart.IgnoreUndoUpdate = false; 2717 obPart.IgnoreUndoUpdate = false;
2716 obPart.StoreUndoState(); 2718 obPart.StoreUndoState();
2717 } 2719 }
@@ -2729,47 +2731,29 @@ namespace OpenSim.Region.Framework.Scenes
2729 { 2731 {
2730 SceneObjectPart obPart = parts[i]; 2732 SceneObjectPart obPart = parts[i];
2731 obPart.IgnoreUndoUpdate = true; 2733 obPart.IgnoreUndoUpdate = true;
2734
2732 if (obPart.UUID != m_rootPart.UUID) 2735 if (obPart.UUID != m_rootPart.UUID)
2733 { 2736 {
2734 Vector3 currentpos = new Vector3(obPart.OffsetPosition); 2737 Vector3 currentpos = new Vector3(obPart.OffsetPosition);
2735 currentpos.X *= x; 2738 currentpos.X *= x;
2736 currentpos.Y *= y; 2739 currentpos.Y *= y;
2737 currentpos.Z *= z; 2740 currentpos.Z *= z;
2741
2738 Vector3 newSize = new Vector3(obPart.Scale); 2742 Vector3 newSize = new Vector3(obPart.Scale);
2739 newSize.X *= x; 2743 newSize.X *= x;
2740 newSize.Y *= y; 2744 newSize.Y *= y;
2741 newSize.Z *= z; 2745 newSize.Z *= z;
2746
2742 obPart.Resize(newSize); 2747 obPart.Resize(newSize);
2743 obPart.UpdateOffSet(currentpos); 2748 obPart.UpdateOffSet(currentpos);
2744
2745 if (obPart.PhysActor != null)
2746 {
2747 obPart.PhysActor.Size = newSize;
2748
2749 // If we're a sculpt wait for the trigger when the sculpt texture is retrieved.
2750 if (((OpenMetaverse.SculptType)obPart.Shape.SculptType) != SculptType.Mesh)
2751 m_scene.PhysicsScene.AddPhysicsActorTaint(obPart.PhysActor);
2752 }
2753 } 2749 }
2754 2750
2755 obPart.IgnoreUndoUpdate = false; 2751 obPart.IgnoreUndoUpdate = false;
2756 obPart.StoreUndoState(); 2752 obPart.StoreUndoState();
2757 } 2753 }
2758 2754
2759 if (RootPart.PhysActor != null)
2760 {
2761 RootPart.PhysActor.Size = prevScale;
2762
2763 // If we're a sculpt wait for the trigger when the sculpt texture is retrieved.
2764 if (((OpenMetaverse.SculptType)RootPart.Shape.SculptType) != SculptType.Mesh)
2765 m_scene.PhysicsScene.AddPhysicsActorTaint(RootPart.PhysActor);
2766 }
2767
2768 RootPart.IgnoreUndoUpdate = false; 2755 RootPart.IgnoreUndoUpdate = false;
2769 RootPart.StoreUndoState(); 2756 RootPart.StoreUndoState();
2770 HasGroupChanged = true;
2771 RootPart.TriggerScriptChangedEvent(Changed.SCALE);
2772 ScheduleGroupForTerseUpdate();
2773 } 2757 }
2774 2758
2775 #endregion 2759 #endregion