diff options
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs b/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs index 9bab2b6..f283ecb 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 void LoadGroupFromXml2(Scene scene, string xmlString) | 107 | public static SceneObjectGroup LoadGroupFromXml2(Scene scene, string xmlString) |
108 | { | 108 | { |
109 | XmlDocument doc = new XmlDocument(); | 109 | XmlDocument doc = new XmlDocument(); |
110 | XmlNode rootNode; | 110 | XmlNode rootNode; |
@@ -126,11 +126,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
126 | { | 126 | { |
127 | CreatePrimFromXml2(scene, aPrimNode.OuterXml); | 127 | CreatePrimFromXml2(scene, aPrimNode.OuterXml); |
128 | } | 128 | } |
129 | |||
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; | ||
129 | } | 132 | } |
130 | else | 133 | else |
131 | { | 134 | { |
132 | CreatePrimFromXml2(scene, rootNode.OuterXml); | 135 | return CreatePrimFromXml2(scene, rootNode.OuterXml); |
133 | } | 136 | } |
134 | } | 137 | } |
135 | 138 | ||
136 | /// <summary> | 139 | /// <summary> |
@@ -177,11 +180,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
177 | /// </summary> | 180 | /// </summary> |
178 | /// <param name="scene"></param> | 181 | /// <param name="scene"></param> |
179 | /// <param name="xmlData"></param> | 182 | /// <param name="xmlData"></param> |
180 | protected static void CreatePrimFromXml2(Scene scene, string xmlData) | 183 | /// <returns>The scene object created</returns> |
184 | protected static SceneObjectGroup CreatePrimFromXml2(Scene scene, string xmlData) | ||
181 | { | 185 | { |
182 | SceneObjectGroup obj = new SceneObjectGroup(xmlData); | 186 | SceneObjectGroup obj = new SceneObjectGroup(xmlData); |
183 | 187 | ||
184 | scene.AddRestoredSceneObject(obj, true); | 188 | scene.AddRestoredSceneObject(obj, true); |
189 | |||
190 | return obj; | ||
185 | } | 191 | } |
186 | 192 | ||
187 | public static void SavePrimsToXml2(Scene scene, string fileName) | 193 | public static void SavePrimsToXml2(Scene scene, string fileName) |