diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 27 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneManager.cs | 8 |
2 files changed, 27 insertions, 8 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 8c95a0d..3ede889 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -40,6 +40,7 @@ using OpenSim.Framework.Communications; | |||
40 | using OpenSim.Framework.Communications.Cache; | 40 | using OpenSim.Framework.Communications.Cache; |
41 | using OpenSim.Framework.Servers; | 41 | using OpenSim.Framework.Servers; |
42 | using OpenSim.Region.Environment.Interfaces; | 42 | using OpenSim.Region.Environment.Interfaces; |
43 | using OpenSim.Region.Environment.Modules.World.Archiver; | ||
43 | using OpenSim.Region.Environment.Modules.World.Terrain; | 44 | using OpenSim.Region.Environment.Modules.World.Terrain; |
44 | using OpenSim.Region.Environment.Scenes.Scripting; | 45 | using OpenSim.Region.Environment.Scenes.Scripting; |
45 | using OpenSim.Region.Physics.Manager; | 46 | using OpenSim.Region.Physics.Manager; |
@@ -58,7 +59,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
58 | public SynchronizeSceneHandler SynchronizeScene = null; | 59 | public SynchronizeSceneHandler SynchronizeScene = null; |
59 | public int splitID = 0; | 60 | public int splitID = 0; |
60 | 61 | ||
61 | |||
62 | #region Fields | 62 | #region Fields |
63 | 63 | ||
64 | protected Timer m_heartbeatTimer = new Timer(); | 64 | protected Timer m_heartbeatTimer = new Timer(); |
@@ -138,7 +138,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
138 | private int m_update_terrain = 50; | 138 | private int m_update_terrain = 50; |
139 | private int m_update_land = 1; | 139 | private int m_update_land = 1; |
140 | 140 | ||
141 | |||
142 | private int frameMS = 0; | 141 | private int frameMS = 0; |
143 | private int physicsMS2 = 0; | 142 | private int physicsMS2 = 0; |
144 | private int physicsMS = 0; | 143 | private int physicsMS = 0; |
@@ -631,7 +630,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
631 | } | 630 | } |
632 | 631 | ||
633 | /// <summary> | 632 | /// <summary> |
634 | /// Sets up references to loaded modules required by thie scene | 633 | /// Sets up references to modules required by the scene |
635 | /// </summary> | 634 | /// </summary> |
636 | public void SetModuleInterfaces() | 635 | public void SetModuleInterfaces() |
637 | { | 636 | { |
@@ -1043,7 +1042,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1043 | //} | 1042 | //} |
1044 | //else | 1043 | //else |
1045 | //{ | 1044 | //{ |
1046 | float tmpval = (float)hm[x, y]; | 1045 | //float tmpval = (float)hm[x, y]; |
1047 | float heightvalue = (float)hm[x, y]; | 1046 | float heightvalue = (float)hm[x, y]; |
1048 | 1047 | ||
1049 | if ((float)heightvalue > m_regInfo.EstateSettings.waterHeight) | 1048 | if ((float)heightvalue > m_regInfo.EstateSettings.waterHeight) |
@@ -1380,6 +1379,26 @@ namespace OpenSim.Region.Environment.Scenes | |||
1380 | { | 1379 | { |
1381 | m_sceneXmlLoader.SavePrimsToXml2(fileName); | 1380 | m_sceneXmlLoader.SavePrimsToXml2(fileName); |
1382 | } | 1381 | } |
1382 | |||
1383 | /// <summary> | ||
1384 | /// Load a prim archive into the scene. This loads both prims and their assets. | ||
1385 | /// </summary> | ||
1386 | /// <param name="filePath"></param> | ||
1387 | public void LoadPrimsFromArchive(string filePath) | ||
1388 | { | ||
1389 | IRegionArchiver archiver = RequestModuleInterface<IRegionArchiver>(); | ||
1390 | archiver.DearchiveRegion(this, filePath); | ||
1391 | } | ||
1392 | |||
1393 | /// <summary> | ||
1394 | /// Save the prims in the scene to an archive. This saves both prims and their assets. | ||
1395 | /// </summary> | ||
1396 | /// <param name="filePath"></param> | ||
1397 | public void SavePrimsToArchive(string filePath) | ||
1398 | { | ||
1399 | IRegionArchiver archiver = RequestModuleInterface<IRegionArchiver>(); | ||
1400 | archiver.ArchiveRegion(this, filePath); | ||
1401 | } | ||
1383 | 1402 | ||
1384 | /// <summary> | 1403 | /// <summary> |
1385 | /// Locate New region Handle and offset the prim position for the new region | 1404 | /// Locate New region Handle and offset the prim position for the new region |
diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs index 68dfa2f..2baef9d 100644 --- a/OpenSim/Region/Environment/Scenes/SceneManager.cs +++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs | |||
@@ -199,9 +199,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
199 | /// as well as the details of the prims themselves. | 199 | /// as well as the details of the prims themselves. |
200 | /// </summary> | 200 | /// </summary> |
201 | /// <param name="filename"></param> | 201 | /// <param name="filename"></param> |
202 | public void SaveCurrentSceneToOar(string filename) | 202 | public void SaveCurrentSceneToArchive(string filename) |
203 | { | 203 | { |
204 | // TODO Nothing yet | 204 | CurrentOrFirstScene.LoadPrimsFromArchive(filename); |
205 | } | 205 | } |
206 | 206 | ||
207 | /// <summary> | 207 | /// <summary> |
@@ -209,9 +209,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
209 | /// their assets to the asset service. | 209 | /// their assets to the asset service. |
210 | /// </summary> | 210 | /// </summary> |
211 | /// <param name="filename"></param> | 211 | /// <param name="filename"></param> |
212 | public void LoadCurrentSceneFromOar(string filename) | 212 | public void LoadCurrentSceneFromArchive(string filename) |
213 | { | 213 | { |
214 | // TODO Nothing yet | 214 | CurrentOrFirstScene.SavePrimsToArchive(filename); |
215 | } | 215 | } |
216 | 216 | ||
217 | [Obsolete("TODO: Remove this warning by 0.7")] | 217 | [Obsolete("TODO: Remove this warning by 0.7")] |