diff options
author | Justin Clark-Casey (justincc) | 2012-09-26 23:17:21 +0100 |
---|---|---|
committer | Melanie | 2012-09-27 15:48:47 +0100 |
commit | 9eca154bced7423867e8f9597b8baf214de79087 (patch) | |
tree | ffbb038aebe837ee5ec560a607eb55891cdb3ca5 /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |
parent | Merge commit '327320d1a7acbba969d26c281f92f64ce8ff365f' into careminster (diff) | |
download | opensim-SC-9eca154bced7423867e8f9597b8baf214de79087.zip opensim-SC-9eca154bced7423867e8f9597b8baf214de79087.tar.gz opensim-SC-9eca154bced7423867e8f9597b8baf214de79087.tar.bz2 opensim-SC-9eca154bced7423867e8f9597b8baf214de79087.tar.xz |
Make it possible to rescale SOGs when they are not in a scene.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-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 4af508e..44573eb 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -2972,16 +2972,20 @@ namespace OpenSim.Region.Framework.Scenes | |||
2972 | /// <param name="scale"></param> | 2972 | /// <param name="scale"></param> |
2973 | public void Resize(Vector3 scale) | 2973 | public void Resize(Vector3 scale) |
2974 | { | 2974 | { |
2975 | scale.X = Math.Max(ParentGroup.Scene.m_minNonphys, Math.Min(ParentGroup.Scene.m_maxNonphys, scale.X)); | ||
2976 | scale.Y = Math.Max(ParentGroup.Scene.m_minNonphys, Math.Min(ParentGroup.Scene.m_maxNonphys, scale.Y)); | ||
2977 | scale.Z = Math.Max(ParentGroup.Scene.m_minNonphys, Math.Min(ParentGroup.Scene.m_maxNonphys, scale.Z)); | ||
2978 | |||
2979 | PhysicsActor pa = PhysActor; | 2975 | PhysicsActor pa = PhysActor; |
2980 | if (pa != null && pa.IsPhysical) | 2976 | |
2977 | if (ParentGroup.Scene != null) | ||
2981 | { | 2978 | { |
2982 | scale.X = Math.Max(ParentGroup.Scene.m_minPhys, Math.Min(ParentGroup.Scene.m_maxPhys, scale.X)); | 2979 | scale.X = Math.Max(ParentGroup.Scene.m_minNonphys, Math.Min(ParentGroup.Scene.m_maxNonphys, scale.X)); |
2983 | scale.Y = Math.Max(ParentGroup.Scene.m_minPhys, Math.Min(ParentGroup.Scene.m_maxPhys, scale.Y)); | 2980 | scale.Y = Math.Max(ParentGroup.Scene.m_minNonphys, Math.Min(ParentGroup.Scene.m_maxNonphys, scale.Y)); |
2984 | scale.Z = Math.Max(ParentGroup.Scene.m_minPhys, Math.Min(ParentGroup.Scene.m_maxPhys, scale.Z)); | 2981 | scale.Z = Math.Max(ParentGroup.Scene.m_minNonphys, Math.Min(ParentGroup.Scene.m_maxNonphys, scale.Z)); |
2982 | |||
2983 | if (pa != null && pa.IsPhysical) | ||
2984 | { | ||
2985 | scale.X = Math.Max(ParentGroup.Scene.m_minPhys, Math.Min(ParentGroup.Scene.m_maxPhys, scale.X)); | ||
2986 | scale.Y = Math.Max(ParentGroup.Scene.m_minPhys, Math.Min(ParentGroup.Scene.m_maxPhys, scale.Y)); | ||
2987 | scale.Z = Math.Max(ParentGroup.Scene.m_minPhys, Math.Min(ParentGroup.Scene.m_maxPhys, scale.Z)); | ||
2988 | } | ||
2985 | } | 2989 | } |
2986 | 2990 | ||
2987 | // m_log.DebugFormat("[SCENE OBJECT PART]: Resizing {0} {1} to {2}", Name, LocalId, scale); | 2991 | // m_log.DebugFormat("[SCENE OBJECT PART]: Resizing {0} {1} to {2}", Name, LocalId, scale); |