aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
authorUbitUmarov2012-03-10 20:32:19 +0000
committerUbitUmarov2012-03-10 20:32:19 +0000
commit908abb1c3dded307e769abac71f660b835875975 (patch)
tree755d4e532a94346fe1960e3870f07767fbcfdd4a /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
parentubitOde bug (diff)
downloadopensim-SC_OLD-908abb1c3dded307e769abac71f660b835875975.zip
opensim-SC_OLD-908abb1c3dded307e769abac71f660b835875975.tar.gz
opensim-SC_OLD-908abb1c3dded307e769abac71f660b835875975.tar.bz2
opensim-SC_OLD-908abb1c3dded307e769abac71f660b835875975.tar.xz
BIG MESS. changed Iclient interface so only one event is used to inform scene about position scale or rotation change by client (others can be added). Its served at SceneGraph that does permition checks, undostore and sends down to SOG. changed values are stored in a class (ObjectChangeData) and what is changed as a enum (ObjectChangeWhat) with bit fields and 'macros' of this for better readability (at top of scenegraph.cs lasy to find better place for now) this can be extended for other things clients changes and need undo/redo. SOG process acording to what is changed. Changed UNDO/redo to use this also (warning is only storing what is changed, previus stored all, this must be checked for side efects. to save all PRS change commented line in scenegraph). Still have excessive calls to ScheduleGroupForTerseUpdate. **** UNTESTED ****
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs47
1 files changed, 43 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 6622495..c806fda 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1944,6 +1944,7 @@ namespace OpenSim.Region.Framework.Scenes
1944 1944
1945 PhysActor.OnRequestTerseUpdate += PhysicsRequestingTerseUpdate; 1945 PhysActor.OnRequestTerseUpdate += PhysicsRequestingTerseUpdate;
1946 PhysActor.OnOutOfBounds += PhysicsOutOfBounds; 1946 PhysActor.OnOutOfBounds += PhysicsOutOfBounds;
1947
1947 if (ParentID != 0 && ParentID != LocalId) 1948 if (ParentID != 0 && ParentID != LocalId)
1948 { 1949 {
1949 if (ParentGroup.RootPart.PhysActor != null) 1950 if (ParentGroup.RootPart.PhysActor != null)
@@ -3656,7 +3657,7 @@ namespace OpenSim.Region.Framework.Scenes
3656 ParentGroup.ScheduleGroupForTerseUpdate(); 3657 ParentGroup.ScheduleGroupForTerseUpdate();
3657 //ParentGroup.ScheduleGroupForFullUpdate(); 3658 //ParentGroup.ScheduleGroupForFullUpdate();
3658 } 3659 }
3659 3660/*
3660 public void StoreUndoState() 3661 public void StoreUndoState()
3661 { 3662 {
3662 StoreUndoState(false); 3663 StoreUndoState(false);
@@ -3697,6 +3698,44 @@ namespace OpenSim.Region.Framework.Scenes
3697 } 3698 }
3698 } 3699 }
3699 } 3700 }
3701*/
3702
3703
3704 public void StoreUndoState(ObjectChangeWhat what)
3705 {
3706 if (!Undoing && !IgnoreUndoUpdate) // just to read better - undo is in progress, or suspended
3707 {
3708 if (ParentGroup != null)
3709 {
3710 lock (m_undo)
3711 {
3712 if (m_undo.Count > 0)
3713 {
3714 // see if we had a change
3715
3716 UndoState last = m_undo.Peek();
3717 if (last != null)
3718 {
3719 if (last.Compare(this, what))
3720 {
3721 return;
3722 }
3723 }
3724 }
3725
3726 if (ParentGroup.GetSceneMaxUndo() > 0)
3727 {
3728 UndoState nUndo = new UndoState(this, what);
3729
3730 m_undo.Push(nUndo);
3731
3732 if (m_redo.Count > 0)
3733 m_redo.Clear();
3734 }
3735 }
3736 }
3737 }
3738 }
3700 3739
3701 /// <summary> 3740 /// <summary>
3702 /// Return number of undos on the stack. Here temporarily pending a refactor. 3741 /// Return number of undos on the stack. Here temporarily pending a refactor.
@@ -3725,10 +3764,10 @@ namespace OpenSim.Region.Framework.Scenes
3725 if (goback != null) 3764 if (goback != null)
3726 { 3765 {
3727 UndoState nUndo = null; 3766 UndoState nUndo = null;
3728 3767
3729 if (ParentGroup.GetSceneMaxUndo() > 0) 3768 if (ParentGroup.GetSceneMaxUndo() > 0)
3730 { 3769 {
3731 nUndo = new UndoState(this, goback.ForGroup); 3770 nUndo = new UndoState(this, goback.data.what);
3732 } 3771 }
3733 3772
3734 goback.PlayState(this); 3773 goback.PlayState(this);
@@ -3760,7 +3799,7 @@ namespace OpenSim.Region.Framework.Scenes
3760 { 3799 {
3761 if (ParentGroup.GetSceneMaxUndo() > 0) 3800 if (ParentGroup.GetSceneMaxUndo() > 0)
3762 { 3801 {
3763 UndoState nUndo = new UndoState(this, gofwd.ForGroup); 3802 UndoState nUndo = new UndoState(this, gofwd.data.what);
3764 3803
3765 m_undo.Push(nUndo); 3804 m_undo.Push(nUndo);
3766 } 3805 }