From 667a935fffd6741ab49137870a9e343315849ef7 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Fri, 19 Dec 2008 19:14:52 +0000
Subject: * refactor: remove xml serialization wrappers from Scene
---
OpenSim/Region/Environment/Scenes/Scene.cs | 16 ----------------
OpenSim/Region/Environment/Scenes/SceneManager.cs | 8 ++++++--
2 files changed, 6 insertions(+), 18 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index fec89da..7d83ee2 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -42,8 +42,6 @@ using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Servers;
using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.Interfaces;
-using OpenSim.Region.Environment.Modules.World.Archiver;
-using OpenSim.Region.Environment.Modules.World.Serialiser;
using OpenSim.Region.Environment.Modules.World.Terrain;
using OpenSim.Region.Environment.Scenes.Scripting;
using OpenSim.Region.Physics.Manager;
@@ -1882,20 +1880,6 @@ namespace OpenSim.Region.Environment.Scenes
return false;
}
- public void LoadPrimsFromXml(string fileName, bool newIdsFlag, Vector3 loadOffset)
- {
- m_log.InfoFormat("[SCENE]: Loading prims in xml format to region {0} from {1}", RegionInfo.RegionName, fileName);
-
- m_serialiser.LoadPrimsFromXml(this, fileName, newIdsFlag, loadOffset);
- }
-
- public void SavePrimsToXml(string fileName)
- {
- m_log.InfoFormat("[SCENE]: Saving prims in xml format for region {0} to {1}", RegionInfo.RegionName, fileName);
-
- m_serialiser.SavePrimsToXml(this, fileName);
- }
-
public void LoadPrimsFromXml2(string fileName)
{
m_log.InfoFormat("[SCENE]: Loading prims in xml2 format to region {0} from {1}", RegionInfo.RegionName, fileName);
diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs
index 6072b70..b973ced 100644
--- a/OpenSim/Region/Environment/Scenes/SceneManager.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs
@@ -184,7 +184,9 @@ namespace OpenSim.Region.Environment.Scenes
///
public void SaveCurrentSceneToXml(string filename)
{
- CurrentOrFirstScene.SavePrimsToXml(filename);
+ IRegionSerialiserModule serialiser = CurrentOrFirstScene.RequestModuleInterface();
+ if (serialiser != null)
+ serialiser.SavePrimsToXml(CurrentOrFirstScene, filename);
}
///
@@ -195,7 +197,9 @@ namespace OpenSim.Region.Environment.Scenes
///
public void LoadCurrentSceneFromXml(string filename, bool generateNewIDs, Vector3 loadOffset)
{
- CurrentOrFirstScene.LoadPrimsFromXml(filename, generateNewIDs, loadOffset);
+ IRegionSerialiserModule serialiser = CurrentOrFirstScene.RequestModuleInterface();
+ if (serialiser != null)
+ serialiser.LoadPrimsFromXml(CurrentOrFirstScene, filename, generateNewIDs, loadOffset);
}
///
--
cgit v1.1