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.cs70
1 files changed, 57 insertions, 13 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index a89060c..b58bfb8 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
@@ -609,6 +623,8 @@ namespace OpenSim.Region.Framework.Scenes
609 623
610 // Load region settings 624 // Load region settings
611 m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID); 625 m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID);
626 m_regInfo.WindlightSettings = m_storageManager.DataStore.LoadRegionWindlightSettings(m_regInfo.RegionID);
627
612 if (m_storageManager.EstateDataStore != null) 628 if (m_storageManager.EstateDataStore != null)
613 { 629 {
614 m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID, false); 630 m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID, false);
@@ -711,7 +727,7 @@ namespace OpenSim.Region.Framework.Scenes
711 m_useFlySlow = startupConfig.GetBoolean("enableflyslow", false); 727 m_useFlySlow = startupConfig.GetBoolean("enableflyslow", false);
712 // TODO: Change default to true once the feature is supported 728 // TODO: Change default to true once the feature is supported
713 m_usePreJump = startupConfig.GetBoolean("enableprejump", false); 729 m_usePreJump = startupConfig.GetBoolean("enableprejump", false);
714 730 m_usePreJump = true; // Above line fails!?
715 m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", m_maxNonphys); 731 m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", m_maxNonphys);
716 if (RegionInfo.NonphysPrimMax > 0) 732 if (RegionInfo.NonphysPrimMax > 0)
717 { 733 {
@@ -1031,6 +1047,15 @@ namespace OpenSim.Region.Framework.Scenes
1031 /// <param name="seconds">float indicating duration before restart.</param> 1047 /// <param name="seconds">float indicating duration before restart.</param>
1032 public virtual void Restart(float seconds) 1048 public virtual void Restart(float seconds)
1033 { 1049 {
1050 Restart(seconds, true);
1051 }
1052
1053 /// <summary>
1054 /// Given float seconds, this will restart the region. showDialog will optionally alert the users.
1055 /// </summary>
1056 /// <param name="seconds">float indicating duration before restart.</param>
1057 public virtual void Restart(float seconds, bool showDialog)
1058 {
1034 // notifications are done in 15 second increments 1059 // notifications are done in 15 second increments
1035 // so .. if the number of seconds is less then 15 seconds, it's not really a restart request 1060 // so .. if the number of seconds is less then 15 seconds, it's not really a restart request
1036 // It's a 'Cancel restart' request. 1061 // It's a 'Cancel restart' request.
@@ -1051,8 +1076,11 @@ namespace OpenSim.Region.Framework.Scenes
1051 m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); 1076 m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed);
1052 m_log.Info("[REGION]: Restarting Region in " + (seconds / 60) + " minutes"); 1077 m_log.Info("[REGION]: Restarting Region in " + (seconds / 60) + " minutes");
1053 m_restartTimer.Start(); 1078 m_restartTimer.Start();
1054 m_dialogModule.SendNotificationToUsersInRegion( 1079 if (showDialog)
1080 {
1081 m_dialogModule.SendNotificationToUsersInRegion(
1055 UUID.Random(), String.Empty, RegionInfo.RegionName + String.Format(": Restarting in {0} Minutes", (int)(seconds / 60.0))); 1082 UUID.Random(), String.Empty, RegionInfo.RegionName + String.Format(": Restarting in {0} Minutes", (int)(seconds / 60.0)));
1083 }
1056 } 1084 }
1057 } 1085 }
1058 1086
@@ -1408,16 +1436,16 @@ namespace OpenSim.Region.Framework.Scenes
1408 // Check if any objects have reached their targets 1436 // Check if any objects have reached their targets
1409 CheckAtTargets(); 1437 CheckAtTargets();
1410 1438
1411 // Update SceneObjectGroups that have scheduled themselves for updates
1412 // Objects queue their updates onto all scene presences
1413 if (m_frame % m_update_objects == 0)
1414 m_sceneGraph.UpdateObjectGroups();
1415
1416 // Run through all ScenePresences looking for updates 1439 // Run through all ScenePresences looking for updates
1417 // Presence updates and queued object updates for each presence are sent to clients 1440 // Presence updates and queued object updates for each presence are sent to clients
1418 if (m_frame % m_update_presences == 0) 1441 if (m_frame % m_update_presences == 0)
1419 m_sceneGraph.UpdatePresences(); 1442 m_sceneGraph.UpdatePresences();
1420 1443
1444 // Update SceneObjectGroups that have scheduled themselves for updates
1445 // Objects queue their updates onto all scene presences
1446 if (m_frame % m_update_objects == 0)
1447 m_sceneGraph.UpdateObjectGroups();
1448
1421 if (m_frame % m_update_coarse_locations == 0) 1449 if (m_frame % m_update_coarse_locations == 0)
1422 { 1450 {
1423 List<Vector3> coarseLocations; 1451 List<Vector3> coarseLocations;
@@ -2157,7 +2185,7 @@ namespace OpenSim.Region.Framework.Scenes
2157 public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates) 2185 public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates)
2158 { 2186 {
2159 return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, sendClientUpdates); 2187 return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, sendClientUpdates);
2160 } 2188 }
2161 2189
2162 /// <summary> 2190 /// <summary>
2163 /// Delete every object from the scene. This does not include attachments worn by avatars. 2191 /// Delete every object from the scene. This does not include attachments worn by avatars.
@@ -3603,6 +3631,8 @@ namespace OpenSim.Region.Framework.Scenes
3603 } 3631 }
3604 } 3632 }
3605 // Honor parcel landing type and position. 3633 // Honor parcel landing type and position.
3634 /*
3635 ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y);
3606 if (land != null) 3636 if (land != null)
3607 { 3637 {
3608 if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero) 3638 if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero)
@@ -3610,6 +3640,7 @@ namespace OpenSim.Region.Framework.Scenes
3610 agent.startpos = land.LandData.UserLocation; 3640 agent.startpos = land.LandData.UserLocation;
3611 } 3641 }
3612 } 3642 }
3643 */// This is now handled properly in ScenePresence.MakeRootAgent
3613 } 3644 }
3614 3645
3615 return true; 3646 return true;
@@ -3970,12 +4001,22 @@ namespace OpenSim.Region.Framework.Scenes
3970 return false; 4001 return false;
3971 } 4002 }
3972 4003
4004 public bool IncomingCloseAgent(UUID agentID)
4005 {
4006 return IncomingCloseAgent(agentID, false);
4007 }
4008
4009 public bool IncomingCloseChildAgent(UUID agentID)
4010 {
4011 return IncomingCloseAgent(agentID, true);
4012 }
4013
3973 /// <summary> 4014 /// <summary>
3974 /// Tell a single agent to disconnect from the region. 4015 /// Tell a single agent to disconnect from the region.
3975 /// </summary> 4016 /// </summary>
3976 /// <param name="regionHandle"></param>
3977 /// <param name="agentID"></param> 4017 /// <param name="agentID"></param>
3978 public bool IncomingCloseAgent(UUID agentID) 4018 /// <param name="childOnly"></param>
4019 public bool IncomingCloseAgent(UUID agentID, bool childOnly)
3979 { 4020 {
3980 //m_log.DebugFormat("[SCENE]: Processing incoming close agent for {0}", agentID); 4021 //m_log.DebugFormat("[SCENE]: Processing incoming close agent for {0}", agentID);
3981 4022
@@ -3987,7 +4028,7 @@ namespace OpenSim.Region.Framework.Scenes
3987 { 4028 {
3988 m_sceneGraph.removeUserCount(false); 4029 m_sceneGraph.removeUserCount(false);
3989 } 4030 }
3990 else 4031 else if (!childOnly)
3991 { 4032 {
3992 m_sceneGraph.removeUserCount(true); 4033 m_sceneGraph.removeUserCount(true);
3993 } 4034 }
@@ -4003,9 +4044,12 @@ namespace OpenSim.Region.Framework.Scenes
4003 } 4044 }
4004 else 4045 else
4005 presence.ControllingClient.SendShutdownConnectionNotice(); 4046 presence.ControllingClient.SendShutdownConnectionNotice();
4047 presence.ControllingClient.Close(false);
4048 }
4049 else if (!childOnly)
4050 {
4051 presence.ControllingClient.Close(true);
4006 } 4052 }
4007
4008 presence.ControllingClient.Close();
4009 return true; 4053 return true;
4010 } 4054 }
4011 4055