diff options
author | Justin Clarke Casey | 2008-07-18 14:42:06 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-07-18 14:42:06 +0000 |
commit | f8721c3c1cd5d4eb2827ea1cfd36e08f3a100345 (patch) | |
tree | 42bb436a664127499180789e76edacb8e021709a /OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs | |
parent | force Culture to en-US in BaseHttpserver.HandleRequest() --- this (diff) | |
download | opensim-SC_OLD-f8721c3c1cd5d4eb2827ea1cfd36e08f3a100345.zip opensim-SC_OLD-f8721c3c1cd5d4eb2827ea1cfd36e08f3a100345.tar.gz opensim-SC_OLD-f8721c3c1cd5d4eb2827ea1cfd36e08f3a100345.tar.bz2 opensim-SC_OLD-f8721c3c1cd5d4eb2827ea1cfd36e08f3a100345.tar.xz |
* refactor: break out sog loading code into two parts so that post-deserialization changes can be carried out before adding it to a scene
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs b/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs index 6327d65..cd1fecb 100644 --- a/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs +++ b/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs | |||
@@ -104,7 +104,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
104 | return grp.ToXmlString2(); | 104 | return grp.ToXmlString2(); |
105 | } | 105 | } |
106 | 106 | ||
107 | public static SceneObjectGroup LoadGroupFromXml2(Scene scene, string xmlString) | 107 | public static SceneObjectGroup DeserializeGroupFromXml2(string xmlString) |
108 | { | 108 | { |
109 | XmlDocument doc = new XmlDocument(); | 109 | XmlDocument doc = new XmlDocument(); |
110 | XmlNode rootNode; | 110 | XmlNode rootNode; |
@@ -124,15 +124,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
124 | { | 124 | { |
125 | foreach (XmlNode aPrimNode in rootNode.ChildNodes) | 125 | foreach (XmlNode aPrimNode in rootNode.ChildNodes) |
126 | { | 126 | { |
127 | CreatePrimFromXml2(scene, aPrimNode.OuterXml); | 127 | // There is only ever one prim. This oddity should be removeable post 0.5.9 |
128 | return new SceneObjectGroup(aPrimNode.OuterXml); | ||
128 | } | 129 | } |
129 | 130 | ||
130 | // There is only ever one prim, but it's easiest to return null here since this part should disappear post 0.5.9 anyway | ||
131 | return null; | 131 | return null; |
132 | } | 132 | } |
133 | else | 133 | else |
134 | { | 134 | { |
135 | return CreatePrimFromXml2(scene, rootNode.OuterXml); | 135 | return new SceneObjectGroup(rootNode.OuterXml); |
136 | } | 136 | } |
137 | } | 137 | } |
138 | 138 | ||