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 9594e6b..7bea166 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.
@@ -3514,12 +3542,15 @@ namespace OpenSim.Region.Framework.Scenes
3514 { 3542 {
3515 // We have a zombie from a crashed session. Kill it. 3543 // We have a zombie from a crashed session. Kill it.
3516 m_log.DebugFormat("[SCENE]: Zombie scene presence detected for {0} in {1}", agent.AgentID, RegionInfo.RegionName); 3544 m_log.DebugFormat("[SCENE]: Zombie scene presence detected for {0} in {1}", agent.AgentID, RegionInfo.RegionName);
3517 sp.ControllingClient.Close(); 3545 sp.ControllingClient.Close(false);
3518 } 3546 }
3519 } 3547 }
3520 3548
3521 CapsModule.AddCapsHandler(agent.AgentID); 3549 CapsModule.AddCapsHandler(agent.AgentID);
3522 3550
3551 if ((teleportFlags & ((uint)TeleportFlags.ViaLandmark | (uint)TeleportFlags.ViaLocation | (uint)TeleportFlags.ViaLandmark | (uint)TeleportFlags.Default)) != 0)
3552 System.Threading.Thread.Sleep(2000);
3553
3523 if (!agent.child) 3554 if (!agent.child)
3524 { 3555 {
3525 if (TestBorderCross(agent.startpos,Cardinals.E)) 3556 if (TestBorderCross(agent.startpos,Cardinals.E))
@@ -3578,6 +3609,8 @@ namespace OpenSim.Region.Framework.Scenes
3578 } 3609 }
3579 } 3610 }
3580 // Honor parcel landing type and position. 3611 // Honor parcel landing type and position.
3612 /*
3613 ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y);
3581 if (land != null) 3614 if (land != null)
3582 { 3615 {
3583 if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero) 3616 if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero)
@@ -3585,6 +3618,7 @@ namespace OpenSim.Region.Framework.Scenes
3585 agent.startpos = land.LandData.UserLocation; 3618 agent.startpos = land.LandData.UserLocation;
3586 } 3619 }
3587 } 3620 }
3621 */// This is now handled properly in ScenePresence.MakeRootAgent
3588 } 3622 }
3589 3623
3590 agent.teleportFlags = teleportFlags; 3624 agent.teleportFlags = teleportFlags;
@@ -3948,12 +3982,22 @@ namespace OpenSim.Region.Framework.Scenes
3948 return false; 3982 return false;
3949 } 3983 }
3950 3984
3985 public bool IncomingCloseAgent(UUID agentID)
3986 {
3987 return IncomingCloseAgent(agentID, false);
3988 }
3989
3990 public bool IncomingCloseChildAgent(UUID agentID)
3991 {
3992 return IncomingCloseAgent(agentID, true);
3993 }
3994
3951 /// <summary> 3995 /// <summary>
3952 /// Tell a single agent to disconnect from the region. 3996 /// Tell a single agent to disconnect from the region.
3953 /// </summary> 3997 /// </summary>
3954 /// <param name="regionHandle"></param>
3955 /// <param name="agentID"></param> 3998 /// <param name="agentID"></param>
3956 public bool IncomingCloseAgent(UUID agentID) 3999 /// <param name="childOnly"></param>
4000 public bool IncomingCloseAgent(UUID agentID, bool childOnly)
3957 { 4001 {
3958 //m_log.DebugFormat("[SCENE]: Processing incoming close agent for {0}", agentID); 4002 //m_log.DebugFormat("[SCENE]: Processing incoming close agent for {0}", agentID);
3959 4003
@@ -3965,7 +4009,7 @@ namespace OpenSim.Region.Framework.Scenes
3965 { 4009 {
3966 m_sceneGraph.removeUserCount(false); 4010 m_sceneGraph.removeUserCount(false);
3967 } 4011 }
3968 else 4012 else if (!childOnly)
3969 { 4013 {
3970 m_sceneGraph.removeUserCount(true); 4014 m_sceneGraph.removeUserCount(true);
3971 } 4015 }
@@ -3981,9 +4025,12 @@ namespace OpenSim.Region.Framework.Scenes
3981 } 4025 }
3982 else 4026 else
3983 presence.ControllingClient.SendShutdownConnectionNotice(); 4027 presence.ControllingClient.SendShutdownConnectionNotice();
4028 presence.ControllingClient.Close(false);
4029 }
4030 else if (!childOnly)
4031 {
4032 presence.ControllingClient.Close(true);
3984 } 4033 }
3985
3986 presence.ControllingClient.Close();
3987 return true; 4034 return true;
3988 } 4035 }
3989 4036