diff options
author | SignpostMarv | 2012-08-06 15:35:40 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-08-15 23:35:23 +0100 |
commit | ef4122213c440c55d32c097c08e52170f4b4346a (patch) | |
tree | ba7aa3047bac89053992d2539907f07d110f415e /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC_OLD-ef4122213c440c55d32c097c08e52170f4b4346a.zip opensim-SC_OLD-ef4122213c440c55d32c097c08e52170f4b4346a.tar.gz opensim-SC_OLD-ef4122213c440c55d32c097c08e52170f4b4346a.tar.bz2 opensim-SC_OLD-ef4122213c440c55d32c097c08e52170f4b4346a.tar.xz |
enables configurable minimum sizes for physical & non-physical prims
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); |