aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs45
1 files changed, 39 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index bac66cb..254ad05 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -209,6 +209,7 @@ namespace OpenSim.Region.Framework.Scenes
209 209
210 private Timer m_mapGenerationTimer = new Timer(); 210 private Timer m_mapGenerationTimer = new Timer();
211 private bool m_generateMaptiles; 211 private bool m_generateMaptiles;
212 private bool m_useBackup = true;
212 213
213// private Dictionary<UUID, string[]> m_UserNamesCache = new Dictionary<UUID, string[]>(); 214// private Dictionary<UUID, string[]> m_UserNamesCache = new Dictionary<UUID, string[]>();
214 215
@@ -477,6 +478,11 @@ namespace OpenSim.Region.Framework.Scenes
477 get { return m_sceneGraph; } 478 get { return m_sceneGraph; }
478 } 479 }
479 480
481 public bool UseBackup
482 {
483 get { return m_useBackup; }
484 }
485
480 // an instance to the physics plugin's Scene object. 486 // an instance to the physics plugin's Scene object.
481 public PhysicsScene PhysicsScene 487 public PhysicsScene PhysicsScene
482 { 488 {
@@ -620,7 +626,7 @@ namespace OpenSim.Region.Framework.Scenes
620 "delete object uuid <UUID>", 626 "delete object uuid <UUID>",
621 "Delete object by uuid", HandleDeleteObject); 627 "Delete object by uuid", HandleDeleteObject);
622 MainConsole.Instance.Commands.AddCommand("region", false, "delete object name", 628 MainConsole.Instance.Commands.AddCommand("region", false, "delete object name",
623 "delete object name <UUID>", 629 "delete object name <name>",
624 "Delete object by name", HandleDeleteObject); 630 "Delete object by name", HandleDeleteObject);
625 631
626 //Bind Storage Manager functions to some land manager functions for this scene 632 //Bind Storage Manager functions to some land manager functions for this scene
@@ -670,6 +676,9 @@ namespace OpenSim.Region.Framework.Scenes
670 IConfig startupConfig = m_config.Configs["Startup"]; 676 IConfig startupConfig = m_config.Configs["Startup"];
671 677
672 m_defaultDrawDistance = startupConfig.GetFloat("DefaultDrawDistance",m_defaultDrawDistance); 678 m_defaultDrawDistance = startupConfig.GetFloat("DefaultDrawDistance",m_defaultDrawDistance);
679 m_useBackup = startupConfig.GetBoolean("UseSceneBackup", m_useBackup);
680 if (!m_useBackup)
681 m_log.InfoFormat("[SCENE]: Backup has been disabled for {0}", RegionInfo.RegionName);
673 682
674 //Animation states 683 //Animation states
675 m_useFlySlow = startupConfig.GetBoolean("enableflyslow", false); 684 m_useFlySlow = startupConfig.GetBoolean("enableflyslow", false);
@@ -1091,6 +1100,8 @@ namespace OpenSim.Region.Framework.Scenes
1091 shuttingdown = true; 1100 shuttingdown = true;
1092 1101
1093 m_log.Debug("[SCENE]: Persisting changed objects"); 1102 m_log.Debug("[SCENE]: Persisting changed objects");
1103 EventManager.TriggerSceneShuttingDown(this);
1104
1094 EntityBase[] entities = GetEntities(); 1105 EntityBase[] entities = GetEntities();
1095 foreach (EntityBase entity in entities) 1106 foreach (EntityBase entity in entities)
1096 { 1107 {
@@ -2014,16 +2025,17 @@ namespace OpenSim.Region.Framework.Scenes
2014 /// <summary> 2025 /// <summary>
2015 /// Add a newly created object to the scene. 2026 /// Add a newly created object to the scene.
2016 /// </summary> 2027 /// </summary>
2017 /// 2028 /// <remarks>
2018 /// This method does not send updates to the client - callers need to handle this themselves. 2029 /// This method does not send updates to the client - callers need to handle this themselves.
2030 /// </remarks>
2019 /// <param name="sceneObject"></param> 2031 /// <param name="sceneObject"></param>
2020 /// <param name="attachToBackup"></param> 2032 /// <param name="attachToBackup"></param>
2021 /// <param name="pos">Position of the object</param> 2033 /// <param name="pos">Position of the object. If null then the position stored in the object is used.</param>
2022 /// <param name="rot">Rotation of the object</param> 2034 /// <param name="rot">Rotation of the object. If null then the rotation stored in the object is used.</param>
2023 /// <param name="vel">Velocity of the object. This parameter only has an effect if the object is physical</param> 2035 /// <param name="vel">Velocity of the object. This parameter only has an effect if the object is physical</param>
2024 /// <returns></returns> 2036 /// <returns></returns>
2025 public bool AddNewSceneObject( 2037 public bool AddNewSceneObject(
2026 SceneObjectGroup sceneObject, bool attachToBackup, Vector3 pos, Quaternion rot, Vector3 vel) 2038 SceneObjectGroup sceneObject, bool attachToBackup, Vector3? pos, Quaternion? rot, Vector3 vel)
2027 { 2039 {
2028 if (m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, pos, rot, vel)) 2040 if (m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, pos, rot, vel))
2029 { 2041 {
@@ -4436,7 +4448,28 @@ namespace OpenSim.Region.Framework.Scenes
4436 // } 4448 // }
4437 4449
4438 /// <summary> 4450 /// <summary>
4439 /// Get a named prim contained in this scene (will return the first 4451 /// Get a group via its UUID
4452 /// </summary>
4453 /// <param name="fullID"></param>
4454 /// <returns>null if no group with that name exists</returns>
4455 public SceneObjectGroup GetSceneObjectGroup(UUID fullID)
4456 {
4457 return m_sceneGraph.GetSceneObjectGroup(fullID);
4458 }
4459
4460 /// <summary>
4461 /// Get a group by name from the scene (will return the first
4462 /// found, if there are more than one prim with the same name)
4463 /// </summary>
4464 /// <param name="name"></param>
4465 /// <returns>null if no group with that name exists</returns>
4466 public SceneObjectGroup GetSceneObjectGroup(string name)
4467 {
4468 return m_sceneGraph.GetSceneObjectGroup(name);
4469 }
4470
4471 /// <summary>
4472 /// Get a prim by name from the scene (will return the first
4440 /// found, if there are more than one prim with the same name) 4473 /// found, if there are more than one prim with the same name)
4441 /// </summary> 4474 /// </summary>
4442 /// <param name="name"></param> 4475 /// <param name="name"></param>