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.cs48
1 files changed, 41 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index c0fa7b4..2197ced 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -156,6 +156,20 @@ namespace OpenSim.Region.Framework.Scenes
156 156
157 public IXfer XferManager; 157 public IXfer XferManager;
158 158
159 protected ISnmpModule m_snmpService = null;
160 public ISnmpModule SnmpService
161 {
162 get
163 {
164 if (m_snmpService == null)
165 {
166 m_snmpService = RequestModuleInterface<ISnmpModule>();
167 }
168
169 return m_snmpService;
170 }
171 }
172
159 protected IAssetService m_AssetService; 173 protected IAssetService m_AssetService;
160 protected IAuthorizationService m_AuthorizationService; 174 protected IAuthorizationService m_AuthorizationService;
161 175
@@ -613,6 +627,8 @@ namespace OpenSim.Region.Framework.Scenes
613 627
614 // Load region settings 628 // Load region settings
615 m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID); 629 m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID);
630 m_regInfo.WindlightSettings = m_storageManager.DataStore.LoadRegionWindlightSettings(m_regInfo.RegionID);
631
616 if (m_storageManager.EstateDataStore != null) 632 if (m_storageManager.EstateDataStore != null)
617 { 633 {
618 m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID, false); 634 m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID, false);
@@ -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 int tmpPhysicsMS2 = Util.EnvironmentTickCount(); 1449 int tmpPhysicsMS2 = Util.EnvironmentTickCount();
1422 if ((m_frame % m_update_physics == 0) && m_physics_enabled) 1450 if ((m_frame % m_update_physics == 0) && m_physics_enabled)
1423 m_sceneGraph.UpdatePreparePhysics(); 1451 m_sceneGraph.UpdatePreparePhysics();
@@ -2117,7 +2145,7 @@ namespace OpenSim.Region.Framework.Scenes
2117 public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates) 2145 public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates)
2118 { 2146 {
2119 return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, sendClientUpdates); 2147 return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, sendClientUpdates);
2120 } 2148 }
2121 2149
2122 /// <summary> 2150 /// <summary>
2123 /// Delete every object from the scene 2151 /// Delete every object from the scene
@@ -3427,6 +3455,9 @@ namespace OpenSim.Region.Framework.Scenes
3427 3455
3428 CapsModule.AddCapsHandler(agent.AgentID); 3456 CapsModule.AddCapsHandler(agent.AgentID);
3429 3457
3458 if ((teleportFlags & ((uint)TeleportFlags.ViaLandmark | (uint)TeleportFlags.ViaLocation | (uint)TeleportFlags.ViaLandmark | (uint)TeleportFlags.Default)) != 0)
3459 System.Threading.Thread.Sleep(2000);
3460
3430 if (!agent.child) 3461 if (!agent.child)
3431 { 3462 {
3432 if (TestBorderCross(agent.startpos,Cardinals.E)) 3463 if (TestBorderCross(agent.startpos,Cardinals.E))
@@ -3485,6 +3516,8 @@ namespace OpenSim.Region.Framework.Scenes
3485 } 3516 }
3486 } 3517 }
3487 // Honor parcel landing type and position. 3518 // Honor parcel landing type and position.
3519 /*
3520 ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y);
3488 if (land != null) 3521 if (land != null)
3489 { 3522 {
3490 if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero) 3523 if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero)
@@ -3492,6 +3525,7 @@ namespace OpenSim.Region.Framework.Scenes
3492 agent.startpos = land.LandData.UserLocation; 3525 agent.startpos = land.LandData.UserLocation;
3493 } 3526 }
3494 } 3527 }
3528 */// This is now handled properly in ScenePresence.MakeRootAgent
3495 } 3529 }
3496 3530
3497 agent.teleportFlags = teleportFlags; 3531 agent.teleportFlags = teleportFlags;