diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 5035317..ffde68e 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -2846,6 +2846,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
2846 | /// <param name="scale"></param> | 2846 | /// <param name="scale"></param> |
2847 | public void Resize(Vector3 scale) | 2847 | public void Resize(Vector3 scale) |
2848 | { | 2848 | { |
2849 | if (scale.X > ParentGroup.Scene.m_maxNonphys) | ||
2850 | scale.X = ParentGroup.Scene.m_maxNonphys; | ||
2851 | if (scale.Y > ParentGroup.Scene.m_maxNonphys) | ||
2852 | scale.Y = ParentGroup.Scene.m_maxNonphys; | ||
2853 | if (scale.Z > ParentGroup.Scene.m_maxNonphys) | ||
2854 | scale.Z = ParentGroup.Scene.m_maxNonphys; | ||
2855 | |||
2849 | // m_log.DebugFormat("[SCENE OBJECT PART]: Resizing {0} {1} to {2}", Name, LocalId, scale); | 2856 | // m_log.DebugFormat("[SCENE OBJECT PART]: Resizing {0} {1} to {2}", Name, LocalId, scale); |
2850 | 2857 | ||
2851 | StoreUndoState(); | 2858 | StoreUndoState(); |
@@ -2855,9 +2862,27 @@ namespace OpenSim.Region.Framework.Scenes | |||
2855 | // need to reinsert the sculpt data into the shape, since the physics engine deletes it when done to | 2862 | // need to reinsert the sculpt data into the shape, since the physics engine deletes it when done to |
2856 | // save memory | 2863 | // save memory |
2857 | if (PhysActor != null) | 2864 | if (PhysActor != null) |
2858 | CheckSculptAndLoad(); | 2865 | { |
2866 | if (PhysActor.IsPhysical) | ||
2867 | { | ||
2868 | if (scale.X > ParentGroup.Scene.m_maxPhys) | ||
2869 | scale.X = ParentGroup.Scene.m_maxPhys; | ||
2870 | if (scale.Y > ParentGroup.Scene.m_maxPhys) | ||
2871 | scale.Y = ParentGroup.Scene.m_maxPhys; | ||
2872 | if (scale.Z > ParentGroup.Scene.m_maxPhys) | ||
2873 | scale.Z = ParentGroup.Scene.m_maxPhys; | ||
2874 | } | ||
2875 | |||
2876 | PhysActor.Size = scale; | ||
2877 | |||
2878 | if (((OpenMetaverse.SculptType)Shape.SculptType) == SculptType.Mesh) | ||
2879 | CheckSculptAndLoad(); | ||
2880 | else | ||
2881 | ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); | ||
2882 | } | ||
2859 | 2883 | ||
2860 | ParentGroup.HasGroupChanged = true; | 2884 | ParentGroup.HasGroupChanged = true; |
2885 | TriggerScriptChangedEvent(Changed.SCALE); | ||
2861 | ScheduleFullUpdate(); | 2886 | ScheduleFullUpdate(); |
2862 | } | 2887 | } |
2863 | 2888 | ||