aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs1
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs20
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs18
3 files changed, 25 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 00d25c2..bdb7f95 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -569,6 +569,7 @@ namespace OpenSim.Region.Framework.Scenes
569 if (primId != UUID.Zero) 569 if (primId != UUID.Zero)
570 { 570 {
571 SceneObjectPart part = m_parentScene.GetSceneObjectPart(primId); 571 SceneObjectPart part = m_parentScene.GetSceneObjectPart(primId);
572
572 if (part != null) 573 if (part != null)
573 part.Redo(); 574 part.Redo();
574 } 575 }
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 7662874..ce5db5f 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -2623,21 +2623,15 @@ namespace OpenSim.Region.Framework.Scenes
2623 2623
2624 RootPart.IgnoreUndoUpdate = true; 2624 RootPart.IgnoreUndoUpdate = true;
2625 2625
2626 if (scale.X > m_scene.m_maxNonphys) 2626 scale.X = Math.Min(scale.X, Scene.m_maxNonphys);
2627 scale.X = m_scene.m_maxNonphys; 2627 scale.Y = Math.Min(scale.Y, Scene.m_maxNonphys);
2628 if (scale.Y > m_scene.m_maxNonphys) 2628 scale.Z = Math.Min(scale.Z, Scene.m_maxNonphys);
2629 scale.Y = m_scene.m_maxNonphys;
2630 if (scale.Z > m_scene.m_maxNonphys)
2631 scale.Z = m_scene.m_maxNonphys;
2632 2629
2633 if (RootPart.PhysActor != null && RootPart.PhysActor.IsPhysical) 2630 if (RootPart.PhysActor != null && RootPart.PhysActor.IsPhysical)
2634 { 2631 {
2635 if (scale.X > m_scene.m_maxPhys) 2632 scale.X = Math.Min(scale.X, Scene.m_maxPhys);
2636 scale.X = m_scene.m_maxPhys; 2633 scale.Y = Math.Min(scale.Y, Scene.m_maxPhys);
2637 if (scale.Y > m_scene.m_maxPhys) 2634 scale.Z = Math.Min(scale.Z, Scene.m_maxPhys);
2638 scale.Y = m_scene.m_maxPhys;
2639 if (scale.Z > m_scene.m_maxPhys)
2640 scale.Z = m_scene.m_maxPhys;
2641 } 2635 }
2642 2636
2643 float x = (scale.X / RootPart.Scale.X); 2637 float x = (scale.X / RootPart.Scale.X);
@@ -2715,7 +2709,6 @@ namespace OpenSim.Region.Framework.Scenes
2715 } 2709 }
2716 2710
2717 obPart.IgnoreUndoUpdate = false; 2711 obPart.IgnoreUndoUpdate = false;
2718 obPart.StoreUndoState();
2719 } 2712 }
2720 } 2713 }
2721 } 2714 }
@@ -2753,6 +2746,7 @@ namespace OpenSim.Region.Framework.Scenes
2753 } 2746 }
2754 2747
2755 RootPart.IgnoreUndoUpdate = false; 2748 RootPart.IgnoreUndoUpdate = false;
2749
2756 RootPart.StoreUndoState(); 2750 RootPart.StoreUndoState();
2757 } 2751 }
2758 2752
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index f5b8daf..6b9607c 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -3687,6 +3687,8 @@ namespace OpenSim.Region.Framework.Scenes
3687 { 3687 {
3688 if (m_parentGroup != null) 3688 if (m_parentGroup != null)
3689 { 3689 {
3690// m_log.DebugFormat("[SCENE OBJECT PART]: Storing undo state for {0} {1}", Name, LocalId);
3691
3690 lock (m_undo) 3692 lock (m_undo)
3691 { 3693 {
3692 if (m_undo.Count > 0) 3694 if (m_undo.Count > 0)
@@ -3705,11 +3707,18 @@ namespace OpenSim.Region.Framework.Scenes
3705 3707
3706 m_undo.Push(nUndo); 3708 m_undo.Push(nUndo);
3707 } 3709 }
3708
3709 } 3710 }
3710 } 3711 }
3711 } 3712 }
3713// else
3714// {
3715// m_log.DebugFormat("[SCENE OBJECT PART]: Ignoring undo store for {0} {1}", Name, LocalId);
3716// }
3712 } 3717 }
3718// else
3719// {
3720// m_log.DebugFormat("[SCENE OBJECT PART]: Ignoring undo store for {0} {1} since already undoing", Name, LocalId);
3721// }
3713 } 3722 }
3714 3723
3715 public EntityIntersection TestIntersection(Ray iray, Quaternion parentrot) 3724 public EntityIntersection TestIntersection(Ray iray, Quaternion parentrot)
@@ -4179,11 +4188,14 @@ namespace OpenSim.Region.Framework.Scenes
4179 if (m_undo.Count > 0) 4188 if (m_undo.Count > 0)
4180 { 4189 {
4181 UndoState nUndo = null; 4190 UndoState nUndo = null;
4191
4182 if (m_parentGroup.GetSceneMaxUndo() > 0) 4192 if (m_parentGroup.GetSceneMaxUndo() > 0)
4183 { 4193 {
4184 nUndo = new UndoState(this); 4194 nUndo = new UndoState(this);
4185 } 4195 }
4196
4186 UndoState goback = m_undo.Pop(); 4197 UndoState goback = m_undo.Pop();
4198
4187 if (goback != null) 4199 if (goback != null)
4188 { 4200 {
4189 goback.PlaybackState(this); 4201 goback.PlaybackState(this);
@@ -4196,6 +4208,8 @@ namespace OpenSim.Region.Framework.Scenes
4196 4208
4197 public void Redo() 4209 public void Redo()
4198 { 4210 {
4211// m_log.DebugFormat("[SCENE OBJECT PART]: Handling redo request for {0} {1}", Name, LocalId);
4212
4199 lock (m_redo) 4213 lock (m_redo)
4200 { 4214 {
4201 if (m_parentGroup.GetSceneMaxUndo() > 0) 4215 if (m_parentGroup.GetSceneMaxUndo() > 0)
@@ -4204,7 +4218,9 @@ namespace OpenSim.Region.Framework.Scenes
4204 4218
4205 m_undo.Push(nUndo); 4219 m_undo.Push(nUndo);
4206 } 4220 }
4221
4207 UndoState gofwd = m_redo.Pop(); 4222 UndoState gofwd = m_redo.Pop();
4223
4208 if (gofwd != null) 4224 if (gofwd != null)
4209 gofwd.PlayfwdState(this); 4225 gofwd.PlayfwdState(this);
4210 } 4226 }