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 e2ab643..ef662f3 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 {
@@ -1025,6 +1041,15 @@ namespace OpenSim.Region.Framework.Scenes
1025 /// <param name="seconds">float indicating duration before restart.</param> 1041 /// <param name="seconds">float indicating duration before restart.</param>
1026 public virtual void Restart(float seconds) 1042 public virtual void Restart(float seconds)
1027 { 1043 {
1044 Restart(seconds, true);
1045 }
1046
1047 /// <summary>
1048 /// Given float seconds, this will restart the region. showDialog will optionally alert the users.
1049 /// </summary>
1050 /// <param name="seconds">float indicating duration before restart.</param>
1051 public virtual void Restart(float seconds, bool showDialog)
1052 {
1028 // notifications are done in 15 second increments 1053 // notifications are done in 15 second increments
1029 // so .. if the number of seconds is less then 15 seconds, it's not really a restart request 1054 // so .. if the number of seconds is less then 15 seconds, it's not really a restart request
1030 // It's a 'Cancel restart' request. 1055 // It's a 'Cancel restart' request.
@@ -1045,8 +1070,11 @@ namespace OpenSim.Region.Framework.Scenes
1045 m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); 1070 m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed);
1046 m_log.Info("[REGION]: Restarting Region in " + (seconds / 60) + " minutes"); 1071 m_log.Info("[REGION]: Restarting Region in " + (seconds / 60) + " minutes");
1047 m_restartTimer.Start(); 1072 m_restartTimer.Start();
1048 m_dialogModule.SendNotificationToUsersInRegion( 1073 if (showDialog)
1074 {
1075 m_dialogModule.SendNotificationToUsersInRegion(
1049 UUID.Random(), String.Empty, RegionInfo.RegionName + String.Format(": Restarting in {0} Minutes", (int)(seconds / 60.0))); 1076 UUID.Random(), String.Empty, RegionInfo.RegionName + String.Format(": Restarting in {0} Minutes", (int)(seconds / 60.0)));
1077 }
1050 } 1078 }
1051 } 1079 }
1052 1080
@@ -1404,16 +1432,16 @@ namespace OpenSim.Region.Framework.Scenes
1404 // Check if any objects have reached their targets 1432 // Check if any objects have reached their targets
1405 CheckAtTargets(); 1433 CheckAtTargets();
1406 1434
1407 // Update SceneObjectGroups that have scheduled themselves for updates
1408 // Objects queue their updates onto all scene presences
1409 if (m_frame % m_update_objects == 0)
1410 m_sceneGraph.UpdateObjectGroups();
1411
1412 // Run through all ScenePresences looking for updates 1435 // Run through all ScenePresences looking for updates
1413 // Presence updates and queued object updates for each presence are sent to clients 1436 // Presence updates and queued object updates for each presence are sent to clients
1414 if (m_frame % m_update_presences == 0) 1437 if (m_frame % m_update_presences == 0)
1415 m_sceneGraph.UpdatePresences(); 1438 m_sceneGraph.UpdatePresences();
1416 1439
1440 // Update SceneObjectGroups that have scheduled themselves for updates
1441 // Objects queue their updates onto all scene presences
1442 if (m_frame % m_update_objects == 0)
1443 m_sceneGraph.UpdateObjectGroups();
1444
1417 if (m_frame % m_update_coarse_locations == 0) 1445 if (m_frame % m_update_coarse_locations == 0)
1418 { 1446 {
1419 List<Vector3> coarseLocations; 1447 List<Vector3> coarseLocations;
@@ -2138,7 +2166,7 @@ namespace OpenSim.Region.Framework.Scenes
2138 public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates) 2166 public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates)
2139 { 2167 {
2140 return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, sendClientUpdates); 2168 return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, sendClientUpdates);
2141 } 2169 }
2142 2170
2143 /// <summary> 2171 /// <summary>
2144 /// Delete every object from the scene. This does not include attachments worn by avatars. 2172 /// Delete every object from the scene. This does not include attachments worn by avatars.
@@ -3584,6 +3612,8 @@ namespace OpenSim.Region.Framework.Scenes
3584 } 3612 }
3585 } 3613 }
3586 // Honor parcel landing type and position. 3614 // Honor parcel landing type and position.
3615 /*
3616 ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y);
3587 if (land != null) 3617 if (land != null)
3588 { 3618 {
3589 if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero) 3619 if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero)
@@ -3591,6 +3621,7 @@ namespace OpenSim.Region.Framework.Scenes
3591 agent.startpos = land.LandData.UserLocation; 3621 agent.startpos = land.LandData.UserLocation;
3592 } 3622 }
3593 } 3623 }
3624 */// This is now handled properly in ScenePresence.MakeRootAgent
3594 } 3625 }
3595 3626
3596 return true; 3627 return true;
@@ -3953,12 +3984,22 @@ namespace OpenSim.Region.Framework.Scenes
3953 return false; 3984 return false;
3954 } 3985 }
3955 3986
3987 public bool IncomingCloseAgent(UUID agentID)
3988 {
3989 return IncomingCloseAgent(agentID, false);
3990 }
3991
3992 public bool IncomingCloseChildAgent(UUID agentID)
3993 {
3994 return IncomingCloseAgent(agentID, true);
3995 }
3996
3956 /// <summary> 3997 /// <summary>
3957 /// Tell a single agent to disconnect from the region. 3998 /// Tell a single agent to disconnect from the region.
3958 /// </summary> 3999 /// </summary>
3959 /// <param name="regionHandle"></param>
3960 /// <param name="agentID"></param> 4000 /// <param name="agentID"></param>
3961 public bool IncomingCloseAgent(UUID agentID) 4001 /// <param name="childOnly"></param>
4002 public bool IncomingCloseAgent(UUID agentID, bool childOnly)
3962 { 4003 {
3963 //m_log.DebugFormat("[SCENE]: Processing incoming close agent for {0}", agentID); 4004 //m_log.DebugFormat("[SCENE]: Processing incoming close agent for {0}", agentID);
3964 4005
@@ -3970,7 +4011,7 @@ namespace OpenSim.Region.Framework.Scenes
3970 { 4011 {
3971 m_sceneGraph.removeUserCount(false); 4012 m_sceneGraph.removeUserCount(false);
3972 } 4013 }
3973 else 4014 else if (!childOnly)
3974 { 4015 {
3975 m_sceneGraph.removeUserCount(true); 4016 m_sceneGraph.removeUserCount(true);
3976 } 4017 }
@@ -3986,9 +4027,12 @@ namespace OpenSim.Region.Framework.Scenes
3986 } 4027 }
3987 else 4028 else
3988 presence.ControllingClient.SendShutdownConnectionNotice(); 4029 presence.ControllingClient.SendShutdownConnectionNotice();
4030 presence.ControllingClient.Close(false);
4031 }
4032 else if (!childOnly)
4033 {
4034 presence.ControllingClient.Close(true);
3989 } 4035 }
3990
3991 presence.ControllingClient.Close();
3992 return true; 4036 return true;
3993 } 4037 }
3994 4038