diff options
author | Adam Frisby | 2008-05-01 16:35:00 +0000 |
---|---|---|
committer | Adam Frisby | 2008-05-01 16:35:00 +0000 |
commit | 13526097f24b7a8ad63b1d482c44b44397fa055f (patch) | |
tree | 7a82c20ed7c63e2aea5ad3863325e37f64e1cbea /OpenSim/Region/Environment/Scenes/UndoState.cs | |
parent | * Breaking all the code, breaking all the code..! (diff) | |
download | opensim-SC-13526097f24b7a8ad63b1d482c44b44397fa055f.zip opensim-SC-13526097f24b7a8ad63b1d482c44b44397fa055f.tar.gz opensim-SC-13526097f24b7a8ad63b1d482c44b44397fa055f.tar.bz2 opensim-SC-13526097f24b7a8ad63b1d482c44b44397fa055f.tar.xz |
* Spring cleaning on Region.Environment.
* Converted a large number of read-only fields to be actually, readonly.
* Reformatted code sections.
* Removed redundant code.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/UndoState.cs | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/OpenSim/Region/Environment/Scenes/UndoState.cs b/OpenSim/Region/Environment/Scenes/UndoState.cs index daabd8d..f16bb34 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 LLVector3 Scale = LLVector3.Zero; | ||
36 | public LLQuaternion Rotation = LLQuaternion.Identity; | 35 | public LLQuaternion Rotation = LLQuaternion.Identity; |
36 | public LLVector3 Scale = LLVector3.Zero; | ||
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,18 +50,20 @@ namespace OpenSim.Region.Environment.Scenes | |||
50 | { | 50 | { |
51 | Position = part.AbsolutePosition; | 51 | Position = part.AbsolutePosition; |
52 | Rotation = part.RotationOffset; | 52 | Rotation = part.RotationOffset; |
53 | |||
54 | } | 53 | } |
55 | else | 54 | else |
56 | { | 55 | { |
57 | Position = part.GroupPosition; | 56 | Position = part.GroupPosition; |
58 | Rotation = part.RotationOffset; | 57 | Rotation = part.RotationOffset; |
59 | Scale = part.Shape.Scale; | 58 | Scale = part.Shape.Scale; |
60 | |||
61 | } | 59 | } |
62 | } | 60 | } |
63 | } | 61 | } |
64 | 62 | ||
63 | public UndoState() | ||
64 | { | ||
65 | } | ||
66 | |||
65 | public bool Compare(SceneObjectPart part) | 67 | public bool Compare(SceneObjectPart part) |
66 | { | 68 | { |
67 | if (part != null) | 69 | if (part != null) |
@@ -79,7 +81,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
79 | return true; | 81 | return true; |
80 | else | 82 | else |
81 | return false; | 83 | return false; |
82 | |||
83 | } | 84 | } |
84 | } | 85 | } |
85 | return false; | 86 | return false; |
@@ -90,7 +91,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
90 | if (part != null) | 91 | if (part != null) |
91 | { | 92 | { |
92 | part.m_undoing = true; | 93 | part.m_undoing = true; |
93 | 94 | ||
94 | if (part.ParentID == 0) | 95 | if (part.ParentID == 0) |
95 | { | 96 | { |
96 | part.ParentGroup.AbsolutePosition = Position; | 97 | part.ParentGroup.AbsolutePosition = Position; |
@@ -105,12 +106,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
105 | part.ScheduleTerseUpdate(); | 106 | part.ScheduleTerseUpdate(); |
106 | } | 107 | } |
107 | part.m_undoing = false; | 108 | part.m_undoing = false; |
108 | |||
109 | } | 109 | } |
110 | } | 110 | } |
111 | |||
112 | public UndoState() | ||
113 | { | ||
114 | } | ||
115 | } | 111 | } |
116 | } | 112 | } \ No newline at end of file |