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.cs75
1 files changed, 61 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 46fbcd3..3e20766 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -149,6 +149,20 @@ namespace OpenSim.Region.Framework.Scenes
149 149
150 public IXfer XferManager; 150 public IXfer XferManager;
151 151
152 protected ISnmpModule m_snmpService = null;
153 public ISnmpModule SnmpService
154 {
155 get
156 {
157 if (m_snmpService == null)
158 {
159 m_snmpService = RequestModuleInterface<ISnmpModule>();
160 }
161
162 return m_snmpService;
163 }
164 }
165
152 protected IAssetService m_AssetService; 166 protected IAssetService m_AssetService;
153 protected IAuthorizationService m_AuthorizationService; 167 protected IAuthorizationService m_AuthorizationService;
154 168
@@ -608,6 +622,8 @@ namespace OpenSim.Region.Framework.Scenes
608 622
609 // Load region settings 623 // Load region settings
610 m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID); 624 m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID);
625 m_regInfo.WindlightSettings = m_storageManager.DataStore.LoadRegionWindlightSettings(m_regInfo.RegionID);
626
611 if (m_storageManager.EstateDataStore != null) 627 if (m_storageManager.EstateDataStore != null)
612 { 628 {
613 m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID, false); 629 m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID, false);
@@ -710,7 +726,7 @@ namespace OpenSim.Region.Framework.Scenes
710 m_useFlySlow = startupConfig.GetBoolean("enableflyslow", false); 726 m_useFlySlow = startupConfig.GetBoolean("enableflyslow", false);
711 // TODO: Change default to true once the feature is supported 727 // TODO: Change default to true once the feature is supported
712 m_usePreJump = startupConfig.GetBoolean("enableprejump", false); 728 m_usePreJump = startupConfig.GetBoolean("enableprejump", false);
713 729 m_usePreJump = true; // Above line fails!?
714 m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", m_maxNonphys); 730 m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", m_maxNonphys);
715 if (RegionInfo.NonphysPrimMax > 0) 731 if (RegionInfo.NonphysPrimMax > 0)
716 { 732 {
@@ -1030,6 +1046,15 @@ namespace OpenSim.Region.Framework.Scenes
1030 /// <param name="seconds">float indicating duration before restart.</param> 1046 /// <param name="seconds">float indicating duration before restart.</param>
1031 public virtual void Restart(float seconds) 1047 public virtual void Restart(float seconds)
1032 { 1048 {
1049 Restart(seconds, true);
1050 }
1051
1052 /// <summary>
1053 /// Given float seconds, this will restart the region. showDialog will optionally alert the users.
1054 /// </summary>
1055 /// <param name="seconds">float indicating duration before restart.</param>
1056 public virtual void Restart(float seconds, bool showDialog)
1057 {
1033 // notifications are done in 15 second increments 1058 // notifications are done in 15 second increments
1034 // so .. if the number of seconds is less then 15 seconds, it's not really a restart request 1059 // so .. if the number of seconds is less then 15 seconds, it's not really a restart request
1035 // It's a 'Cancel restart' request. 1060 // It's a 'Cancel restart' request.
@@ -1050,8 +1075,11 @@ namespace OpenSim.Region.Framework.Scenes
1050 m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); 1075 m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed);
1051 m_log.Info("[REGION]: Restarting Region in " + (seconds / 60) + " minutes"); 1076 m_log.Info("[REGION]: Restarting Region in " + (seconds / 60) + " minutes");
1052 m_restartTimer.Start(); 1077 m_restartTimer.Start();
1053 m_dialogModule.SendNotificationToUsersInRegion( 1078 if (showDialog)
1079 {
1080 m_dialogModule.SendNotificationToUsersInRegion(
1054 UUID.Random(), String.Empty, RegionInfo.RegionName + String.Format(": Restarting in {0} Minutes", (int)(seconds / 60.0))); 1081 UUID.Random(), String.Empty, RegionInfo.RegionName + String.Format(": Restarting in {0} Minutes", (int)(seconds / 60.0)));
1082 }
1055 } 1083 }
1056 } 1084 }
1057 1085
@@ -1407,16 +1435,16 @@ namespace OpenSim.Region.Framework.Scenes
1407 // Check if any objects have reached their targets 1435 // Check if any objects have reached their targets
1408 CheckAtTargets(); 1436 CheckAtTargets();
1409 1437
1410 // Update SceneObjectGroups that have scheduled themselves for updates
1411 // Objects queue their updates onto all scene presences
1412 if (m_frame % m_update_objects == 0)
1413 m_sceneGraph.UpdateObjectGroups();
1414
1415 // Run through all ScenePresences looking for updates 1438 // Run through all ScenePresences looking for updates
1416 // Presence updates and queued object updates for each presence are sent to clients 1439 // Presence updates and queued object updates for each presence are sent to clients
1417 if (m_frame % m_update_presences == 0) 1440 if (m_frame % m_update_presences == 0)
1418 m_sceneGraph.UpdatePresences(); 1441 m_sceneGraph.UpdatePresences();
1419 1442
1443 // Update SceneObjectGroups that have scheduled themselves for updates
1444 // Objects queue their updates onto all scene presences
1445 if (m_frame % m_update_objects == 0)
1446 m_sceneGraph.UpdateObjectGroups();
1447
1420 int tmpPhysicsMS2 = Util.EnvironmentTickCount(); 1448 int tmpPhysicsMS2 = Util.EnvironmentTickCount();
1421 if ((m_frame % m_update_physics == 0) && m_physics_enabled) 1449 if ((m_frame % m_update_physics == 0) && m_physics_enabled)
1422 m_sceneGraph.UpdatePreparePhysics(); 1450 m_sceneGraph.UpdatePreparePhysics();
@@ -2118,7 +2146,7 @@ namespace OpenSim.Region.Framework.Scenes
2118 public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates) 2146 public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates)
2119 { 2147 {
2120 return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, sendClientUpdates); 2148 return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, sendClientUpdates);
2121 } 2149 }
2122 2150
2123 /// <summary> 2151 /// <summary>
2124 /// Delete every object from the scene 2152 /// Delete every object from the scene
@@ -3460,12 +3488,15 @@ namespace OpenSim.Region.Framework.Scenes
3460 { 3488 {
3461 // We have a zombie from a crashed session. Kill it. 3489 // We have a zombie from a crashed session. Kill it.
3462 m_log.DebugFormat("[SCENE]: Zombie scene presence detected for {0} in {1}", agent.AgentID, RegionInfo.RegionName); 3490 m_log.DebugFormat("[SCENE]: Zombie scene presence detected for {0} in {1}", agent.AgentID, RegionInfo.RegionName);
3463 sp.ControllingClient.Close(); 3491 sp.ControllingClient.Close(false);
3464 } 3492 }
3465 } 3493 }
3466 3494
3467 CapsModule.AddCapsHandler(agent.AgentID); 3495 CapsModule.AddCapsHandler(agent.AgentID);
3468 3496
3497 if ((teleportFlags & ((uint)TeleportFlags.ViaLandmark | (uint)TeleportFlags.ViaLocation | (uint)TeleportFlags.ViaLandmark | (uint)TeleportFlags.Default)) != 0)
3498 System.Threading.Thread.Sleep(2000);
3499
3469 if (!agent.child) 3500 if (!agent.child)
3470 { 3501 {
3471 if (TestBorderCross(agent.startpos,Cardinals.E)) 3502 if (TestBorderCross(agent.startpos,Cardinals.E))
@@ -3524,6 +3555,8 @@ namespace OpenSim.Region.Framework.Scenes
3524 } 3555 }
3525 } 3556 }
3526 // Honor parcel landing type and position. 3557 // Honor parcel landing type and position.
3558 /*
3559 ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y);
3527 if (land != null) 3560 if (land != null)
3528 { 3561 {
3529 if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero) 3562 if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero)
@@ -3531,6 +3564,7 @@ namespace OpenSim.Region.Framework.Scenes
3531 agent.startpos = land.LandData.UserLocation; 3564 agent.startpos = land.LandData.UserLocation;
3532 } 3565 }
3533 } 3566 }
3567 */// This is now handled properly in ScenePresence.MakeRootAgent
3534 } 3568 }
3535 3569
3536 agent.teleportFlags = teleportFlags; 3570 agent.teleportFlags = teleportFlags;
@@ -3879,12 +3913,22 @@ namespace OpenSim.Region.Framework.Scenes
3879 return false; 3913 return false;
3880 } 3914 }
3881 3915
3916 public bool IncomingCloseAgent(UUID agentID)
3917 {
3918 return IncomingCloseAgent(agentID, false);
3919 }
3920
3921 public bool IncomingCloseChildAgent(UUID agentID)
3922 {
3923 return IncomingCloseAgent(agentID, true);
3924 }
3925
3882 /// <summary> 3926 /// <summary>
3883 /// Tell a single agent to disconnect from the region. 3927 /// Tell a single agent to disconnect from the region.
3884 /// </summary> 3928 /// </summary>
3885 /// <param name="regionHandle"></param>
3886 /// <param name="agentID"></param> 3929 /// <param name="agentID"></param>
3887 public bool IncomingCloseAgent(UUID agentID) 3930 /// <param name="childOnly"></param>
3931 public bool IncomingCloseAgent(UUID agentID, bool childOnly)
3888 { 3932 {
3889 //m_log.DebugFormat("[SCENE]: Processing incoming close agent for {0}", agentID); 3933 //m_log.DebugFormat("[SCENE]: Processing incoming close agent for {0}", agentID);
3890 3934
@@ -3896,7 +3940,7 @@ namespace OpenSim.Region.Framework.Scenes
3896 { 3940 {
3897 m_sceneGraph.removeUserCount(false); 3941 m_sceneGraph.removeUserCount(false);
3898 } 3942 }
3899 else 3943 else if (!childOnly)
3900 { 3944 {
3901 m_sceneGraph.removeUserCount(true); 3945 m_sceneGraph.removeUserCount(true);
3902 } 3946 }
@@ -3912,9 +3956,12 @@ namespace OpenSim.Region.Framework.Scenes
3912 } 3956 }
3913 else 3957 else
3914 presence.ControllingClient.SendShutdownConnectionNotice(); 3958 presence.ControllingClient.SendShutdownConnectionNotice();
3959 presence.ControllingClient.Close(false);
3960 }
3961 else if (!childOnly)
3962 {
3963 presence.ControllingClient.Close(true);
3915 } 3964 }
3916
3917 presence.ControllingClient.Close();
3918 return true; 3965 return true;
3919 } 3966 }
3920 3967