diff options
author | Justin Clark-Casey (justincc) | 2011-07-16 01:36:27 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-07-16 01:36:27 +0100 |
commit | 18652eb87ef0613b66664059581f991448d76af4 (patch) | |
tree | d0ca27e3ccaed6d82d56e8431136ebf4ccb6df63 /OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |
parent | use constants in llGetObjectDetails() rather than magic numbers (diff) | |
download | opensim-SC_OLD-18652eb87ef0613b66664059581f991448d76af4.zip opensim-SC_OLD-18652eb87ef0613b66664059581f991448d76af4.tar.gz opensim-SC_OLD-18652eb87ef0613b66664059581f991448d76af4.tar.bz2 opensim-SC_OLD-18652eb87ef0613b66664059581f991448d76af4.tar.xz |
Fix physics proxy regeneration when a mesh with more than one submesh is resized
Addresses http://opensimulator.org/mantis/view.php?id=5584
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 0fbd746..fd5f1b0 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -2662,13 +2662,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
2662 | SceneObjectPart part = GetChildPart(localID); | 2662 | SceneObjectPart part = GetChildPart(localID); |
2663 | if (part != null) | 2663 | if (part != null) |
2664 | { | 2664 | { |
2665 | // m_log.DebugFormat( | ||
2666 | // "[SCENE OBJECT GROUP]: Group resizing {0} {1} from {2} to {3}", Name, localID, part.Scale, scale); | ||
2667 | |||
2665 | part.IgnoreUndoUpdate = true; | 2668 | part.IgnoreUndoUpdate = true; |
2669 | |||
2666 | if (scale.X > m_scene.m_maxNonphys) | 2670 | if (scale.X > m_scene.m_maxNonphys) |
2667 | scale.X = m_scene.m_maxNonphys; | 2671 | scale.X = m_scene.m_maxNonphys; |
2668 | if (scale.Y > m_scene.m_maxNonphys) | 2672 | if (scale.Y > m_scene.m_maxNonphys) |
2669 | scale.Y = m_scene.m_maxNonphys; | 2673 | scale.Y = m_scene.m_maxNonphys; |
2670 | if (scale.Z > m_scene.m_maxNonphys) | 2674 | if (scale.Z > m_scene.m_maxNonphys) |
2671 | scale.Z = m_scene.m_maxNonphys; | 2675 | scale.Z = m_scene.m_maxNonphys; |
2676 | |||
2672 | if (part.PhysActor != null && part.PhysActor.IsPhysical) | 2677 | if (part.PhysActor != null && part.PhysActor.IsPhysical) |
2673 | { | 2678 | { |
2674 | if (scale.X > m_scene.m_maxPhys) | 2679 | if (scale.X > m_scene.m_maxPhys) |
@@ -2780,7 +2785,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
2780 | newSize.Z *= z; | 2785 | newSize.Z *= z; |
2781 | obPart.Resize(newSize); | 2786 | obPart.Resize(newSize); |
2782 | obPart.UpdateOffSet(currentpos); | 2787 | obPart.UpdateOffSet(currentpos); |
2788 | |||
2789 | if (obPart.PhysActor != null) | ||
2790 | { | ||
2791 | obPart.PhysActor.Size = newSize; | ||
2792 | m_scene.PhysicsScene.AddPhysicsActorTaint(obPart.PhysActor); | ||
2793 | } | ||
2783 | } | 2794 | } |
2795 | |||
2784 | obPart.IgnoreUndoUpdate = false; | 2796 | obPart.IgnoreUndoUpdate = false; |
2785 | obPart.StoreUndoState(); | 2797 | obPart.StoreUndoState(); |
2786 | } | 2798 | } |