diff options
author | Justin Clark-Casey (justincc) | 2012-09-26 23:17:21 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-09-26 23:17:21 +0100 |
commit | 36e3123069fb7524d3872d095c0f54c155c55a28 (patch) | |
tree | 63fbd5099bc821c79d7fc210913df95fd30ee0f2 /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |
parent | Enforce existing 5 action hardcoded undo limit. (diff) | |
download | opensim-SC-36e3123069fb7524d3872d095c0f54c155c55a28.zip opensim-SC-36e3123069fb7524d3872d095c0f54c155c55a28.tar.gz opensim-SC-36e3123069fb7524d3872d095c0f54c155c55a28.tar.bz2 opensim-SC-36e3123069fb7524d3872d095c0f54c155c55a28.tar.xz |
Make it possible to rescale SOGs when they are not in a scene.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 9e78242..018e4fc 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -2368,16 +2368,20 @@ 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.Max(ParentGroup.Scene.m_minNonphys, Math.Min(ParentGroup.Scene.m_maxNonphys, scale.X)); | ||
2372 | scale.Y = Math.Max(ParentGroup.Scene.m_minNonphys, Math.Min(ParentGroup.Scene.m_maxNonphys, scale.Y)); | ||
2373 | scale.Z = Math.Max(ParentGroup.Scene.m_minNonphys, Math.Min(ParentGroup.Scene.m_maxNonphys, scale.Z)); | ||
2374 | |||
2375 | PhysicsActor pa = PhysActor; | 2371 | PhysicsActor pa = PhysActor; |
2376 | if (pa != null && pa.IsPhysical) | 2372 | |
2373 | if (ParentGroup.Scene != null) | ||
2377 | { | 2374 | { |
2378 | scale.X = Math.Max(ParentGroup.Scene.m_minPhys, Math.Min(ParentGroup.Scene.m_maxPhys, scale.X)); | 2375 | scale.X = Math.Max(ParentGroup.Scene.m_minNonphys, Math.Min(ParentGroup.Scene.m_maxNonphys, scale.X)); |
2379 | scale.Y = Math.Max(ParentGroup.Scene.m_minPhys, Math.Min(ParentGroup.Scene.m_maxPhys, scale.Y)); | 2376 | scale.Y = Math.Max(ParentGroup.Scene.m_minNonphys, Math.Min(ParentGroup.Scene.m_maxNonphys, scale.Y)); |
2380 | scale.Z = Math.Max(ParentGroup.Scene.m_minPhys, Math.Min(ParentGroup.Scene.m_maxPhys, scale.Z)); | 2377 | scale.Z = Math.Max(ParentGroup.Scene.m_minNonphys, Math.Min(ParentGroup.Scene.m_maxNonphys, scale.Z)); |
2378 | |||
2379 | if (pa != null && pa.IsPhysical) | ||
2380 | { | ||
2381 | scale.X = Math.Max(ParentGroup.Scene.m_minPhys, Math.Min(ParentGroup.Scene.m_maxPhys, scale.X)); | ||
2382 | scale.Y = Math.Max(ParentGroup.Scene.m_minPhys, Math.Min(ParentGroup.Scene.m_maxPhys, scale.Y)); | ||
2383 | scale.Z = Math.Max(ParentGroup.Scene.m_minPhys, Math.Min(ParentGroup.Scene.m_maxPhys, scale.Z)); | ||
2384 | } | ||
2381 | } | 2385 | } |
2382 | 2386 | ||
2383 | // m_log.DebugFormat("[SCENE OBJECT PART]: Resizing {0} {1} to {2}", Name, LocalId, scale); | 2387 | // m_log.DebugFormat("[SCENE OBJECT PART]: Resizing {0} {1} to {2}", Name, LocalId, scale); |