diff options
author | lbsa71 | 2007-12-27 21:41:48 +0000 |
---|---|---|
committer | lbsa71 | 2007-12-27 21:41:48 +0000 |
commit | efd90b56b761219af6425b1c7a2cdd3b6ffb4de2 (patch) | |
tree | bf5b897e1e3c13211e3e2fc61d30508b94c928c0 /OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs | |
parent | * removed always true if (diff) | |
download | opensim-SC-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.zip opensim-SC-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.gz opensim-SC-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.bz2 opensim-SC-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.xz |
* Optimized usings
* shortened references
* Removed redundant 'this'
* Normalized EOF
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs b/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs index aeb9c61..8c4a951 100644 --- a/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs +++ b/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs | |||
@@ -28,17 +28,16 @@ | |||
28 | 28 | ||
29 | using System; | 29 | using System; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Text; | ||
32 | using System.Xml; | ||
33 | using System.IO; | 31 | using System.IO; |
34 | using libsecondlife; | 32 | using System.Xml; |
35 | using Axiom.Math; | 33 | using Axiom.Math; |
34 | using libsecondlife; | ||
36 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
37 | using OpenSim.Region.Physics.Manager; | 36 | using OpenSim.Region.Physics.Manager; |
38 | 37 | ||
39 | namespace OpenSim.Region.Environment.Scenes | 38 | namespace OpenSim.Region.Environment.Scenes |
40 | { | 39 | { |
41 | public class SceneXmlLoader // can move to a module? | 40 | public class SceneXmlLoader // can move to a module? |
42 | { | 41 | { |
43 | protected InnerScene m_innerScene; | 42 | protected InnerScene m_innerScene; |
44 | protected RegionInfo m_regInfo; | 43 | protected RegionInfo m_regInfo; |
@@ -78,8 +77,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
78 | SceneObjectPart rootPart = obj.GetChildPart(obj.UUID); | 77 | SceneObjectPart rootPart = obj.GetChildPart(obj.UUID); |
79 | // Apply loadOffsets for load/import and move combinations | 78 | // Apply loadOffsets for load/import and move combinations |
80 | rootPart.GroupPosition = rootPart.AbsolutePosition + loadOffset; | 79 | rootPart.GroupPosition = rootPart.AbsolutePosition + loadOffset; |
81 | bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0) && m_parentScene.m_physicalPrim); | 80 | bool UsePhysics = (((rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Physics) > 0) && |
82 | if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0) | 81 | m_parentScene.m_physicalPrim); |
82 | if ((rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Phantom) == 0) | ||
83 | { | 83 | { |
84 | rootPart.PhysActor = m_innerScene.PhysicsScene.AddPrimShape( | 84 | rootPart.PhysActor = m_innerScene.PhysicsScene.AddPrimShape( |
85 | rootPart.Name, | 85 | rootPart.Name, |
@@ -91,7 +91,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
91 | new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X, | 91 | new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X, |
92 | rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics); | 92 | rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics); |
93 | rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); | 93 | rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); |
94 | |||
95 | } | 94 | } |
96 | primCount++; | 95 | primCount++; |
97 | } | 96 | } |
@@ -115,7 +114,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
115 | { | 114 | { |
116 | if (ent is SceneObjectGroup) | 115 | if (ent is SceneObjectGroup) |
117 | { | 116 | { |
118 | stream.WriteLine(((SceneObjectGroup)ent).ToXmlString()); | 117 | stream.WriteLine(((SceneObjectGroup) ent).ToXmlString()); |
119 | primCount++; | 118 | primCount++; |
120 | } | 119 | } |
121 | } | 120 | } |
@@ -152,8 +151,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
152 | m_innerScene.AddEntityFromStorage(obj); | 151 | m_innerScene.AddEntityFromStorage(obj); |
153 | 152 | ||
154 | SceneObjectPart rootPart = obj.GetChildPart(obj.UUID); | 153 | SceneObjectPart rootPart = obj.GetChildPart(obj.UUID); |
155 | bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0) && m_parentScene.m_physicalPrim); | 154 | bool UsePhysics = (((rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Physics) > 0) && |
156 | if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0) | 155 | m_parentScene.m_physicalPrim); |
156 | if ((rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Phantom) == 0) | ||
157 | { | 157 | { |
158 | rootPart.PhysActor = m_innerScene.PhysicsScene.AddPrimShape( | 158 | rootPart.PhysActor = m_innerScene.PhysicsScene.AddPrimShape( |
159 | rootPart.Name, | 159 | rootPart.Name, |
@@ -180,7 +180,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
180 | { | 180 | { |
181 | if (ent is SceneObjectGroup) | 181 | if (ent is SceneObjectGroup) |
182 | { | 182 | { |
183 | stream.WriteLine(((SceneObjectGroup)ent).ToXmlString2()); | 183 | stream.WriteLine(((SceneObjectGroup) ent).ToXmlString2()); |
184 | primCount++; | 184 | primCount++; |
185 | } | 185 | } |
186 | } | 186 | } |
@@ -188,6 +188,5 @@ namespace OpenSim.Region.Environment.Scenes | |||
188 | stream.Close(); | 188 | stream.Close(); |
189 | file.Close(); | 189 | file.Close(); |
190 | } | 190 | } |
191 | |||
192 | } | 191 | } |
193 | } | 192 | } \ No newline at end of file |