aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/UndoState.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/UndoState.cs20
1 files changed, 12 insertions, 8 deletions
diff --git a/OpenSim/Region/Environment/Scenes/UndoState.cs b/OpenSim/Region/Environment/Scenes/UndoState.cs
index f16bb34..daabd8d 100644
--- a/OpenSim/Region/Environment/Scenes/UndoState.cs
+++ b/OpenSim/Region/Environment/Scenes/UndoState.cs
@@ -32,8 +32,8 @@ namespace OpenSim.Region.Environment.Scenes
32 public class UndoState 32 public class UndoState
33 { 33 {
34 public LLVector3 Position = LLVector3.Zero; 34 public LLVector3 Position = LLVector3.Zero;
35 public LLQuaternion Rotation = LLQuaternion.Identity;
36 public LLVector3 Scale = LLVector3.Zero; 35 public LLVector3 Scale = LLVector3.Zero;
36 public LLQuaternion Rotation = LLQuaternion.Identity;
37 37
38 public UndoState(LLVector3 pos, LLQuaternion rot, LLVector3 scale) 38 public UndoState(LLVector3 pos, LLQuaternion rot, LLVector3 scale)
39 { 39 {
@@ -41,7 +41,7 @@ namespace OpenSim.Region.Environment.Scenes
41 Rotation = rot; 41 Rotation = rot;
42 Scale = scale; 42 Scale = scale;
43 } 43 }
44 44
45 public UndoState(SceneObjectPart part) 45 public UndoState(SceneObjectPart part)
46 { 46 {
47 if (part != null) 47 if (part != null)
@@ -50,20 +50,18 @@ namespace OpenSim.Region.Environment.Scenes
50 { 50 {
51 Position = part.AbsolutePosition; 51 Position = part.AbsolutePosition;
52 Rotation = part.RotationOffset; 52 Rotation = part.RotationOffset;
53
53 } 54 }
54 else 55 else
55 { 56 {
56 Position = part.GroupPosition; 57 Position = part.GroupPosition;
57 Rotation = part.RotationOffset; 58 Rotation = part.RotationOffset;
58 Scale = part.Shape.Scale; 59 Scale = part.Shape.Scale;
60
59 } 61 }
60 } 62 }
61 } 63 }
62 64
63 public UndoState()
64 {
65 }
66
67 public bool Compare(SceneObjectPart part) 65 public bool Compare(SceneObjectPart part)
68 { 66 {
69 if (part != null) 67 if (part != null)
@@ -81,6 +79,7 @@ namespace OpenSim.Region.Environment.Scenes
81 return true; 79 return true;
82 else 80 else
83 return false; 81 return false;
82
84 } 83 }
85 } 84 }
86 return false; 85 return false;
@@ -91,7 +90,7 @@ namespace OpenSim.Region.Environment.Scenes
91 if (part != null) 90 if (part != null)
92 { 91 {
93 part.m_undoing = true; 92 part.m_undoing = true;
94 93
95 if (part.ParentID == 0) 94 if (part.ParentID == 0)
96 { 95 {
97 part.ParentGroup.AbsolutePosition = Position; 96 part.ParentGroup.AbsolutePosition = Position;
@@ -106,7 +105,12 @@ namespace OpenSim.Region.Environment.Scenes
106 part.ScheduleTerseUpdate(); 105 part.ScheduleTerseUpdate();
107 } 106 }
108 part.m_undoing = false; 107 part.m_undoing = false;
108
109 } 109 }
110 } 110 }
111
112 public UndoState()
113 {
114 }
111 } 115 }
112} \ No newline at end of file 116}