aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-05-30 17:52:14 +0000
committerJustin Clarke Casey2008-05-30 17:52:14 +0000
commit4f237f3ae3b8561de0dacd1ec0e937ec7a8e0307 (patch)
tree728db0e5d0691b553b8ebe4e5a13560c4657c7e2 /OpenSim/Region/Environment/Scenes/Scene.cs
parentMantis#1422. Thank you kindly, Xantor for your llLoopSound() (diff)
downloadopensim-SC-4f237f3ae3b8561de0dacd1ec0e937ec7a8e0307.zip
opensim-SC-4f237f3ae3b8561de0dacd1ec0e937ec7a8e0307.tar.gz
opensim-SC-4f237f3ae3b8561de0dacd1ec0e937ec7a8e0307.tar.bz2
opensim-SC-4f237f3ae3b8561de0dacd1ec0e937ec7a8e0307.tar.xz
* Crudely migrate SceneXmlLoader into the Serializer module
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs30
1 files changed, 19 insertions, 11 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index c1e8602..26f3499 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -41,6 +41,7 @@ using OpenSim.Framework.Communications.Cache;
41using OpenSim.Framework.Servers; 41using OpenSim.Framework.Servers;
42using OpenSim.Region.Environment.Interfaces; 42using OpenSim.Region.Environment.Interfaces;
43using OpenSim.Region.Environment.Modules.World.Archiver; 43using OpenSim.Region.Environment.Modules.World.Archiver;
44using OpenSim.Region.Environment.Modules.World.Serialiser;
44using OpenSim.Region.Environment.Modules.World.Terrain; 45using OpenSim.Region.Environment.Modules.World.Terrain;
45using OpenSim.Region.Environment.Scenes.Scripting; 46using OpenSim.Region.Environment.Scenes.Scripting;
46using OpenSim.Region.Physics.Manager; 47using OpenSim.Region.Physics.Manager;
@@ -94,7 +95,6 @@ namespace OpenSim.Region.Environment.Scenes
94 public CommunicationsManager CommsManager; 95 public CommunicationsManager CommsManager;
95 96
96 protected SceneCommunicationService m_sceneGridService; 97 protected SceneCommunicationService m_sceneGridService;
97 protected SceneXmlLoader m_sceneXmlLoader;
98 98
99 /// <summary> 99 /// <summary>
100 /// Each agent has its own capabilities handler. 100 /// Each agent has its own capabilities handler.
@@ -268,8 +268,6 @@ namespace OpenSim.Region.Environment.Scenes
268 // Operating system has killed the plugin 268 // Operating system has killed the plugin
269 m_innerScene.UnRecoverableError += RestartNow; 269 m_innerScene.UnRecoverableError += RestartNow;
270 270
271 m_sceneXmlLoader = new SceneXmlLoader(this, m_innerScene, m_regInfo);
272
273 RegisterDefaultSceneEvents(); 271 RegisterDefaultSceneEvents();
274 272
275 m_httpListener = httpServer; 273 m_httpListener = httpServer;
@@ -1400,22 +1398,26 @@ namespace OpenSim.Region.Environment.Scenes
1400 1398
1401 public void LoadPrimsFromXml(string fileName, bool newIdsFlag, LLVector3 loadOffset) 1399 public void LoadPrimsFromXml(string fileName, bool newIdsFlag, LLVector3 loadOffset)
1402 { 1400 {
1403 m_sceneXmlLoader.LoadPrimsFromXml(fileName, newIdsFlag, loadOffset); 1401 IRegionSerialiser loader = RequestModuleInterface<IRegionSerialiser>();
1402 loader.LoadPrimsFromXml(this, fileName, newIdsFlag, loadOffset);
1404 } 1403 }
1405 1404
1406 public void SavePrimsToXml(string fileName) 1405 public void SavePrimsToXml(string fileName)
1407 { 1406 {
1408 m_sceneXmlLoader.SavePrimsToXml(fileName); 1407 IRegionSerialiser loader = RequestModuleInterface<IRegionSerialiser>();
1408 loader.SavePrimsToXml(this, fileName);
1409 } 1409 }
1410 1410
1411 public void LoadPrimsFromXml2(string fileName) 1411 public void LoadPrimsFromXml2(string fileName)
1412 { 1412 {
1413 m_sceneXmlLoader.LoadPrimsFromXml2(fileName); 1413 IRegionSerialiser loader = RequestModuleInterface<IRegionSerialiser>();
1414 loader.LoadPrimsFromXml2(this, fileName);
1414 } 1415 }
1415 1416
1416 public void SavePrimsToXml2(string fileName) 1417 public void SavePrimsToXml2(string fileName)
1417 { 1418 {
1418 m_sceneXmlLoader.SavePrimsToXml2(fileName); 1419 IRegionSerialiser loader = RequestModuleInterface<IRegionSerialiser>();
1420 loader.SavePrimsToXml2(this, fileName);
1419 } 1421 }
1420 1422
1421 /// <summary> 1423 /// <summary>
@@ -1505,15 +1507,20 @@ namespace OpenSim.Region.Environment.Scenes
1505 grp.OffsetForNewRegion(pos); 1507 grp.OffsetForNewRegion(pos);
1506 1508
1507 CrossPrimGroupIntoNewRegion(newRegionHandle, grp); 1509 CrossPrimGroupIntoNewRegion(newRegionHandle, grp);
1508
1509 } 1510 }
1511
1510 public void CrossPrimGroupIntoNewRegion(ulong newRegionHandle, SceneObjectGroup grp) 1512 public void CrossPrimGroupIntoNewRegion(ulong newRegionHandle, SceneObjectGroup grp)
1511 { 1513 {
1512 int primcrossingXMLmethod = 0; 1514 int primcrossingXMLmethod = 0;
1513 if (newRegionHandle != 0) 1515 if (newRegionHandle != 0)
1514 { 1516 {
1515 bool successYN = false; 1517 bool successYN = false;
1516 successYN = m_sceneGridService.PrimCrossToNeighboringRegion(newRegionHandle, grp.UUID, m_sceneXmlLoader.SavePrimGroupToXML2String(grp), primcrossingXMLmethod); 1518
1519 IRegionSerialiser loader = RequestModuleInterface<IRegionSerialiser>();
1520 successYN
1521 = m_sceneGridService.PrimCrossToNeighboringRegion(
1522 newRegionHandle, grp.UUID, loader.SavePrimGroupToXML2String(grp), primcrossingXMLmethod);
1523
1517 if (successYN) 1524 if (successYN)
1518 { 1525 {
1519 // We remove the object here 1526 // We remove the object here
@@ -1545,7 +1552,9 @@ namespace OpenSim.Region.Environment.Scenes
1545 m_log.Warn("{[INTERREGION]: A new prim arrived from a neighbor"); 1552 m_log.Warn("{[INTERREGION]: A new prim arrived from a neighbor");
1546 if (XMLMethod == 0) 1553 if (XMLMethod == 0)
1547 { 1554 {
1548 m_sceneXmlLoader.LoadGroupFromXml2String(objXMLData); 1555 IRegionSerialiser loader = RequestModuleInterface<IRegionSerialiser>();
1556 loader.LoadGroupFromXml2String(this, objXMLData);
1557
1549 SceneObjectPart RootPrim = GetSceneObjectPart(primID); 1558 SceneObjectPart RootPrim = GetSceneObjectPart(primID);
1550 if (RootPrim != null) 1559 if (RootPrim != null)
1551 { 1560 {
@@ -3025,7 +3034,6 @@ namespace OpenSim.Region.Environment.Scenes
3025 3034
3026 public bool pipeEventsForScript(uint localID) 3035 public bool pipeEventsForScript(uint localID)
3027 { 3036 {
3028
3029 SceneObjectPart part = GetSceneObjectPart(localID); 3037 SceneObjectPart part = GetSceneObjectPart(localID);
3030 if (part != null) 3038 if (part != null)
3031 { 3039 {