aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
authorUbitUmarov2015-10-23 01:39:53 +0100
committerUbitUmarov2015-10-23 01:39:53 +0100
commit28d4afbe3a3f279071743b9ef67fd18c8aadb26e (patch)
treefcb454a060c5bb368a7368b1370f1bb2388794d8 /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
parentlet ode also finish internal representation of prim actors, before simulation (diff)
downloadopensim-SC_OLD-28d4afbe3a3f279071743b9ef67fd18c8aadb26e.zip
opensim-SC_OLD-28d4afbe3a3f279071743b9ef67fd18c8aadb26e.tar.gz
opensim-SC_OLD-28d4afbe3a3f279071743b9ef67fd18c8aadb26e.tar.bz2
opensim-SC_OLD-28d4afbe3a3f279071743b9ef67fd18c8aadb26e.tar.xz
replace objects scale clamp by a more readable clamp. Simplify GroupResize and let rescale factors < 1 also be checked for size limits, Set new scales directly not checking them again.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs19
1 files changed, 9 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index fed9eaf..65511bc 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -3073,18 +3073,17 @@ namespace OpenSim.Region.Framework.Scenes
3073 3073
3074 if (ParentGroup.Scene != null) 3074 if (ParentGroup.Scene != null)
3075 { 3075 {
3076 scale.X = Math.Max(ParentGroup.Scene.m_minNonphys, Math.Min(ParentGroup.Scene.m_maxNonphys, scale.X)); 3076 float minsize = ParentGroup.Scene.m_minNonphys;
3077 scale.Y = Math.Max(ParentGroup.Scene.m_minNonphys, Math.Min(ParentGroup.Scene.m_maxNonphys, scale.Y)); 3077 float maxsize = ParentGroup.Scene.m_maxNonphys;
3078 scale.Z = Math.Max(ParentGroup.Scene.m_minNonphys, Math.Min(ParentGroup.Scene.m_maxNonphys, scale.Z));
3079
3080 if (pa != null && pa.IsPhysical) 3078 if (pa != null && pa.IsPhysical)
3081 { 3079 {
3082 scale.X = Math.Max(ParentGroup.Scene.m_minPhys, Math.Min(ParentGroup.Scene.m_maxPhys, scale.X)); 3080 minsize = ParentGroup.Scene.m_minPhys;
3083 scale.Y = Math.Max(ParentGroup.Scene.m_minPhys, Math.Min(ParentGroup.Scene.m_maxPhys, scale.Y)); 3081 maxsize = ParentGroup.Scene.m_maxPhys;
3084 scale.Z = Math.Max(ParentGroup.Scene.m_minPhys, Math.Min(ParentGroup.Scene.m_maxPhys, scale.Z)); 3082 }
3085 } 3083 scale.X = Util.Clamp(scale.X, minsize, maxsize);
3084 scale.Y = Util.Clamp(scale.Y, minsize, maxsize);
3085 scale.Z = Util.Clamp(scale.Z, minsize, maxsize);
3086 } 3086 }
3087
3088// m_log.DebugFormat("[SCENE OBJECT PART]: Resizing {0} {1} to {2}", Name, LocalId, scale); 3087// m_log.DebugFormat("[SCENE OBJECT PART]: Resizing {0} {1} to {2}", Name, LocalId, scale);
3089 3088
3090 Scale = scale; 3089 Scale = scale;