diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 4c87639..cd75224 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -2368,17 +2368,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
2368 | /// <param name="scale"></param> | 2368 | /// <param name="scale"></param> |
2369 | public void Resize(Vector3 scale) | 2369 | public void Resize(Vector3 scale) |
2370 | { | 2370 | { |
2371 | scale.X = Math.Min(scale.X, ParentGroup.Scene.m_maxNonphys); | 2371 | scale.X = Math.Max(ParentGroup.Scene.m_minNonphys, Math.Min(ParentGroup.Scene.m_maxNonphys, scale.X)); |
2372 | scale.Y = Math.Min(scale.Y, ParentGroup.Scene.m_maxNonphys); | 2372 | scale.Y = Math.Max(ParentGroup.Scene.m_minNonphys, Math.Min(ParentGroup.Scene.m_maxNonphys, scale.Y)); |
2373 | scale.Z = Math.Min(scale.Z, ParentGroup.Scene.m_maxNonphys); | 2373 | scale.Z = Math.Max(ParentGroup.Scene.m_minNonphys, Math.Min(ParentGroup.Scene.m_maxNonphys, scale.Z)); |
2374 | 2374 | ||
2375 | PhysicsActor pa = PhysActor; | 2375 | PhysicsActor pa = PhysActor; |
2376 | |||
2377 | if (pa != null && pa.IsPhysical) | 2376 | if (pa != null && pa.IsPhysical) |
2378 | { | 2377 | { |
2379 | scale.X = Math.Min(scale.X, ParentGroup.Scene.m_maxPhys); | 2378 | scale.X = Math.Max(ParentGroup.Scene.m_minPhys, Math.Min(ParentGroup.Scene.m_maxPhys, scale.X)); |
2380 | scale.Y = Math.Min(scale.Y, ParentGroup.Scene.m_maxPhys); | 2379 | scale.Y = Math.Max(ParentGroup.Scene.m_minPhys, Math.Min(ParentGroup.Scene.m_maxPhys, scale.Y)); |
2381 | scale.Z = Math.Min(scale.Z, ParentGroup.Scene.m_maxPhys); | 2380 | scale.Z = Math.Max(ParentGroup.Scene.m_minPhys, Math.Min(ParentGroup.Scene.m_maxPhys, scale.Z)); |
2382 | } | 2381 | } |
2383 | 2382 | ||
2384 | // m_log.DebugFormat("[SCENE OBJECT PART]: Resizing {0} {1} to {2}", Name, LocalId, scale); | 2383 | // m_log.DebugFormat("[SCENE OBJECT PART]: Resizing {0} {1} to {2}", Name, LocalId, scale); |