diff options
author | Tom Grimshaw | 2010-07-04 19:58:52 -0700 |
---|---|---|
committer | Tom Grimshaw | 2010-07-04 19:58:52 -0700 |
commit | c616335019dc9419460407930af4e40e84663efa (patch) | |
tree | 966803d48e7a80c859d34a6f89da24bf36afa527 /OpenSim/Region | |
parent | The majority of the Undo fix. There is still an issue with Rotation which i'... (diff) | |
download | opensim-SC-c616335019dc9419460407930af4e40e84663efa.zip opensim-SC-c616335019dc9419460407930af4e40e84663efa.tar.gz opensim-SC-c616335019dc9419460407930af4e40e84663efa.tar.bz2 opensim-SC-c616335019dc9419460407930af4e40e84663efa.tar.xz |
Rotation undo fix and remove a debug chatter i missed. Still not working: Individual child prim rotational undo and special cases where the root prim was moved or rotated (all the children then need to restore their offsets). Coming shortly.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/UndoState.cs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/UndoState.cs b/OpenSim/Region/Framework/Scenes/UndoState.cs index ad05351..f9601e6 100644 --- a/OpenSim/Region/Framework/Scenes/UndoState.cs +++ b/OpenSim/Region/Framework/Scenes/UndoState.cs | |||
@@ -68,7 +68,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
68 | //FUBAR WARNING: Do NOT get the group's absoluteposition here | 68 | //FUBAR WARNING: Do NOT get the group's absoluteposition here |
69 | //or you'll experience a loop and/or a stack issue | 69 | //or you'll experience a loop and/or a stack issue |
70 | GroupPosition = part.ParentGroup.RootPart.AbsolutePosition; | 70 | GroupPosition = part.ParentGroup.RootPart.AbsolutePosition; |
71 | GroupRotation = part.ParentGroup.Rotation; | 71 | GroupRotation = part.ParentGroup.GroupRotation; |
72 | Position = part.ParentGroup.RootPart.AbsolutePosition; | 72 | Position = part.ParentGroup.RootPart.AbsolutePosition; |
73 | Rotation = part.RotationOffset; | 73 | Rotation = part.RotationOffset; |
74 | Scale = part.Shape.Scale; | 74 | Scale = part.Shape.Scale; |
@@ -98,7 +98,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
98 | } | 98 | } |
99 | if ((Type & UndoType.STATE_GROUP_SCALE) == 0 || ((last.Type & UndoType.STATE_GROUP_SCALE) >= (Type & UndoType.STATE_GROUP_SCALE))) | 99 | if ((Type & UndoType.STATE_GROUP_SCALE) == 0 || ((last.Type & UndoType.STATE_GROUP_SCALE) >= (Type & UndoType.STATE_GROUP_SCALE))) |
100 | { | 100 | { |
101 | Console.WriteLine("Setting groupscale to " + last.GroupScale.ToString()); | ||
102 | GroupScale = last.GroupScale; | 101 | GroupScale = last.GroupScale; |
103 | Scale = last.Scale; | 102 | Scale = last.Scale; |
104 | } | 103 | } |
@@ -184,7 +183,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
184 | if (GroupChange) | 183 | if (GroupChange) |
185 | { | 184 | { |
186 | part.ParentGroup.RootPart.Undoing = true; | 185 | part.ParentGroup.RootPart.Undoing = true; |
187 | if (Position != Vector3.Zero) | 186 | if (GroupPosition != Vector3.Zero) |
188 | { | 187 | { |
189 | //Calculate the scale... | 188 | //Calculate the scale... |
190 | Vector3 gs = part.Shape.Scale; | 189 | Vector3 gs = part.Shape.Scale; |
@@ -193,7 +192,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
193 | //Scale first since it can affect our position | 192 | //Scale first since it can affect our position |
194 | part.ParentGroup.GroupResize(gs * scale, part.LocalId); | 193 | part.ParentGroup.GroupResize(gs * scale, part.LocalId); |
195 | part.ParentGroup.AbsolutePosition = GroupPosition; | 194 | part.ParentGroup.AbsolutePosition = GroupPosition; |
196 | part.ParentGroup.Rotation = GroupRotation; | 195 | part.ParentGroup.UpdateGroupRotationR(GroupRotation); |
197 | 196 | ||
198 | } | 197 | } |
199 | part.ParentGroup.RootPart.Undoing = false; | 198 | part.ParentGroup.RootPart.Undoing = false; |