aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-07-16 05:23:21 +0100
committerJustin Clark-Casey (justincc)2011-07-16 05:23:21 +0100
commitf5ddf37112d4881243e3350d5df898c6b2bb02ae (patch)
tree72fe5fb9c4a3558fc0ffcc801e3040595ef77d39 /OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
parentremove now unncessary parts of SceneObjectGroup.Resize() (diff)
downloadopensim-SC_OLD-f5ddf37112d4881243e3350d5df898c6b2bb02ae.zip
opensim-SC_OLD-f5ddf37112d4881243e3350d5df898c6b2bb02ae.tar.gz
opensim-SC_OLD-f5ddf37112d4881243e3350d5df898c6b2bb02ae.tar.bz2
opensim-SC_OLD-f5ddf37112d4881243e3350d5df898c6b2bb02ae.tar.xz
Replace ifs in SOG.GroupResize() with Math.Min()
Also fiddle a bit with undo. This is not currently working properly, though to be fair it also didn't appear to work in 0.7.1.1 either (at least for resize). Will get some more attention soon.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs20
1 files changed, 7 insertions, 13 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 7662874..ce5db5f 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -2623,21 +2623,15 @@ namespace OpenSim.Region.Framework.Scenes
2623 2623
2624 RootPart.IgnoreUndoUpdate = true; 2624 RootPart.IgnoreUndoUpdate = true;
2625 2625
2626 if (scale.X > m_scene.m_maxNonphys) 2626 scale.X = Math.Min(scale.X, Scene.m_maxNonphys);
2627 scale.X = m_scene.m_maxNonphys; 2627 scale.Y = Math.Min(scale.Y, Scene.m_maxNonphys);
2628 if (scale.Y > m_scene.m_maxNonphys) 2628 scale.Z = Math.Min(scale.Z, Scene.m_maxNonphys);
2629 scale.Y = m_scene.m_maxNonphys;
2630 if (scale.Z > m_scene.m_maxNonphys)
2631 scale.Z = m_scene.m_maxNonphys;
2632 2629
2633 if (RootPart.PhysActor != null && RootPart.PhysActor.IsPhysical) 2630 if (RootPart.PhysActor != null && RootPart.PhysActor.IsPhysical)
2634 { 2631 {
2635 if (scale.X > m_scene.m_maxPhys) 2632 scale.X = Math.Min(scale.X, Scene.m_maxPhys);
2636 scale.X = m_scene.m_maxPhys; 2633 scale.Y = Math.Min(scale.Y, Scene.m_maxPhys);
2637 if (scale.Y > m_scene.m_maxPhys) 2634 scale.Z = Math.Min(scale.Z, Scene.m_maxPhys);
2638 scale.Y = m_scene.m_maxPhys;
2639 if (scale.Z > m_scene.m_maxPhys)
2640 scale.Z = m_scene.m_maxPhys;
2641 } 2635 }
2642 2636
2643 float x = (scale.X / RootPart.Scale.X); 2637 float x = (scale.X / RootPart.Scale.X);
@@ -2715,7 +2709,6 @@ namespace OpenSim.Region.Framework.Scenes
2715 } 2709 }
2716 2710
2717 obPart.IgnoreUndoUpdate = false; 2711 obPart.IgnoreUndoUpdate = false;
2718 obPart.StoreUndoState();
2719 } 2712 }
2720 } 2713 }
2721 } 2714 }
@@ -2753,6 +2746,7 @@ namespace OpenSim.Region.Framework.Scenes
2753 } 2746 }
2754 2747
2755 RootPart.IgnoreUndoUpdate = false; 2748 RootPart.IgnoreUndoUpdate = false;
2749
2756 RootPart.StoreUndoState(); 2750 RootPart.StoreUndoState();
2757 } 2751 }
2758 2752