diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 48 |
1 files changed, 41 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 1a46837..0ca5948 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 | ||
@@ -602,6 +616,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
602 | 616 | ||
603 | // Load region settings | 617 | // Load region settings |
604 | m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID); | 618 | m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID); |
619 | m_regInfo.WindlightSettings = m_storageManager.DataStore.LoadRegionWindlightSettings(m_regInfo.RegionID); | ||
620 | |||
605 | if (m_storageManager.EstateDataStore != null) | 621 | if (m_storageManager.EstateDataStore != null) |
606 | { | 622 | { |
607 | m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID, false); | 623 | m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID, false); |
@@ -1020,6 +1036,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
1020 | /// <param name="seconds">float indicating duration before restart.</param> | 1036 | /// <param name="seconds">float indicating duration before restart.</param> |
1021 | public virtual void Restart(float seconds) | 1037 | public virtual void Restart(float seconds) |
1022 | { | 1038 | { |
1039 | Restart(seconds, true); | ||
1040 | } | ||
1041 | |||
1042 | /// <summary> | ||
1043 | /// Given float seconds, this will restart the region. showDialog will optionally alert the users. | ||
1044 | /// </summary> | ||
1045 | /// <param name="seconds">float indicating duration before restart.</param> | ||
1046 | public virtual void Restart(float seconds, bool showDialog) | ||
1047 | { | ||
1023 | // notifications are done in 15 second increments | 1048 | // notifications are done in 15 second increments |
1024 | // so .. if the number of seconds is less then 15 seconds, it's not really a restart request | 1049 | // so .. if the number of seconds is less then 15 seconds, it's not really a restart request |
1025 | // It's a 'Cancel restart' request. | 1050 | // It's a 'Cancel restart' request. |
@@ -1040,8 +1065,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1040 | m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); | 1065 | m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); |
1041 | m_log.Info("[REGION]: Restarting Region in " + (seconds / 60) + " minutes"); | 1066 | m_log.Info("[REGION]: Restarting Region in " + (seconds / 60) + " minutes"); |
1042 | m_restartTimer.Start(); | 1067 | m_restartTimer.Start(); |
1043 | m_dialogModule.SendNotificationToUsersInRegion( | 1068 | if (showDialog) |
1069 | { | ||
1070 | m_dialogModule.SendNotificationToUsersInRegion( | ||
1044 | UUID.Random(), String.Empty, RegionInfo.RegionName + String.Format(": Restarting in {0} Minutes", (int)(seconds / 60.0))); | 1071 | UUID.Random(), String.Empty, RegionInfo.RegionName + String.Format(": Restarting in {0} Minutes", (int)(seconds / 60.0))); |
1072 | } | ||
1045 | } | 1073 | } |
1046 | } | 1074 | } |
1047 | 1075 | ||
@@ -1397,16 +1425,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
1397 | // Check if any objects have reached their targets | 1425 | // Check if any objects have reached their targets |
1398 | CheckAtTargets(); | 1426 | CheckAtTargets(); |
1399 | 1427 | ||
1400 | // Update SceneObjectGroups that have scheduled themselves for updates | ||
1401 | // Objects queue their updates onto all scene presences | ||
1402 | if (m_frame % m_update_objects == 0) | ||
1403 | m_sceneGraph.UpdateObjectGroups(); | ||
1404 | |||
1405 | // Run through all ScenePresences looking for updates | 1428 | // Run through all ScenePresences looking for updates |
1406 | // Presence updates and queued object updates for each presence are sent to clients | 1429 | // Presence updates and queued object updates for each presence are sent to clients |
1407 | if (m_frame % m_update_presences == 0) | 1430 | if (m_frame % m_update_presences == 0) |
1408 | m_sceneGraph.UpdatePresences(); | 1431 | m_sceneGraph.UpdatePresences(); |
1409 | 1432 | ||
1433 | // Update SceneObjectGroups that have scheduled themselves for updates | ||
1434 | // Objects queue their updates onto all scene presences | ||
1435 | if (m_frame % m_update_objects == 0) | ||
1436 | m_sceneGraph.UpdateObjectGroups(); | ||
1437 | |||
1410 | int tmpPhysicsMS2 = Util.EnvironmentTickCount(); | 1438 | int tmpPhysicsMS2 = Util.EnvironmentTickCount(); |
1411 | if ((m_frame % m_update_physics == 0) && m_physics_enabled) | 1439 | if ((m_frame % m_update_physics == 0) && m_physics_enabled) |
1412 | m_sceneGraph.UpdatePreparePhysics(); | 1440 | m_sceneGraph.UpdatePreparePhysics(); |
@@ -2106,7 +2134,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2106 | public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates) | 2134 | public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates) |
2107 | { | 2135 | { |
2108 | return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, sendClientUpdates); | 2136 | return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, sendClientUpdates); |
2109 | } | 2137 | } |
2110 | 2138 | ||
2111 | /// <summary> | 2139 | /// <summary> |
2112 | /// Delete every object from the scene | 2140 | /// Delete every object from the scene |
@@ -3416,6 +3444,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3416 | 3444 | ||
3417 | CapsModule.AddCapsHandler(agent.AgentID); | 3445 | CapsModule.AddCapsHandler(agent.AgentID); |
3418 | 3446 | ||
3447 | if ((teleportFlags & ((uint)TeleportFlags.ViaLandmark | (uint)TeleportFlags.ViaLocation | (uint)TeleportFlags.ViaLandmark | (uint)TeleportFlags.Default)) != 0) | ||
3448 | System.Threading.Thread.Sleep(2000); | ||
3449 | |||
3419 | if (!agent.child) | 3450 | if (!agent.child) |
3420 | { | 3451 | { |
3421 | if (TestBorderCross(agent.startpos,Cardinals.E)) | 3452 | if (TestBorderCross(agent.startpos,Cardinals.E)) |
@@ -3474,6 +3505,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3474 | } | 3505 | } |
3475 | } | 3506 | } |
3476 | // Honor parcel landing type and position. | 3507 | // Honor parcel landing type and position. |
3508 | /* | ||
3509 | ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y); | ||
3477 | if (land != null) | 3510 | if (land != null) |
3478 | { | 3511 | { |
3479 | if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero) | 3512 | if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero) |
@@ -3481,6 +3514,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3481 | agent.startpos = land.LandData.UserLocation; | 3514 | agent.startpos = land.LandData.UserLocation; |
3482 | } | 3515 | } |
3483 | } | 3516 | } |
3517 | */// This is now handled properly in ScenePresence.MakeRootAgent | ||
3484 | } | 3518 | } |
3485 | 3519 | ||
3486 | agent.teleportFlags = teleportFlags; | 3520 | agent.teleportFlags = teleportFlags; |