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 57587be..58f890f 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); |
@@ -1016,6 +1032,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
1016 | /// <param name="seconds">float indicating duration before restart.</param> | 1032 | /// <param name="seconds">float indicating duration before restart.</param> |
1017 | public virtual void Restart(float seconds) | 1033 | public virtual void Restart(float seconds) |
1018 | { | 1034 | { |
1035 | Restart(seconds, true); | ||
1036 | } | ||
1037 | |||
1038 | /// <summary> | ||
1039 | /// Given float seconds, this will restart the region. showDialog will optionally alert the users. | ||
1040 | /// </summary> | ||
1041 | /// <param name="seconds">float indicating duration before restart.</param> | ||
1042 | public virtual void Restart(float seconds, bool showDialog) | ||
1043 | { | ||
1019 | // notifications are done in 15 second increments | 1044 | // notifications are done in 15 second increments |
1020 | // so .. if the number of seconds is less then 15 seconds, it's not really a restart request | 1045 | // so .. if the number of seconds is less then 15 seconds, it's not really a restart request |
1021 | // It's a 'Cancel restart' request. | 1046 | // It's a 'Cancel restart' request. |
@@ -1036,8 +1061,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1036 | m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); | 1061 | m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); |
1037 | m_log.Info("[REGION]: Restarting Region in " + (seconds / 60) + " minutes"); | 1062 | m_log.Info("[REGION]: Restarting Region in " + (seconds / 60) + " minutes"); |
1038 | m_restartTimer.Start(); | 1063 | m_restartTimer.Start(); |
1039 | m_dialogModule.SendNotificationToUsersInRegion( | 1064 | if (showDialog) |
1065 | { | ||
1066 | m_dialogModule.SendNotificationToUsersInRegion( | ||
1040 | UUID.Random(), String.Empty, RegionInfo.RegionName + String.Format(": Restarting in {0} Minutes", (int)(seconds / 60.0))); | 1067 | UUID.Random(), String.Empty, RegionInfo.RegionName + String.Format(": Restarting in {0} Minutes", (int)(seconds / 60.0))); |
1068 | } | ||
1041 | } | 1069 | } |
1042 | } | 1070 | } |
1043 | 1071 | ||
@@ -1393,16 +1421,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
1393 | // Check if any objects have reached their targets | 1421 | // Check if any objects have reached their targets |
1394 | CheckAtTargets(); | 1422 | CheckAtTargets(); |
1395 | 1423 | ||
1396 | // Update SceneObjectGroups that have scheduled themselves for updates | ||
1397 | // Objects queue their updates onto all scene presences | ||
1398 | if (m_frame % m_update_objects == 0) | ||
1399 | m_sceneGraph.UpdateObjectGroups(); | ||
1400 | |||
1401 | // Run through all ScenePresences looking for updates | 1424 | // Run through all ScenePresences looking for updates |
1402 | // Presence updates and queued object updates for each presence are sent to clients | 1425 | // Presence updates and queued object updates for each presence are sent to clients |
1403 | if (m_frame % m_update_presences == 0) | 1426 | if (m_frame % m_update_presences == 0) |
1404 | m_sceneGraph.UpdatePresences(); | 1427 | m_sceneGraph.UpdatePresences(); |
1405 | 1428 | ||
1429 | // Update SceneObjectGroups that have scheduled themselves for updates | ||
1430 | // Objects queue their updates onto all scene presences | ||
1431 | if (m_frame % m_update_objects == 0) | ||
1432 | m_sceneGraph.UpdateObjectGroups(); | ||
1433 | |||
1406 | int tmpPhysicsMS2 = Util.EnvironmentTickCount(); | 1434 | int tmpPhysicsMS2 = Util.EnvironmentTickCount(); |
1407 | if ((m_frame % m_update_physics == 0) && m_physics_enabled) | 1435 | if ((m_frame % m_update_physics == 0) && m_physics_enabled) |
1408 | m_sceneGraph.UpdatePreparePhysics(); | 1436 | m_sceneGraph.UpdatePreparePhysics(); |
@@ -2102,7 +2130,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2102 | public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates) | 2130 | public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates) |
2103 | { | 2131 | { |
2104 | return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, sendClientUpdates); | 2132 | return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, sendClientUpdates); |
2105 | } | 2133 | } |
2106 | 2134 | ||
2107 | /// <summary> | 2135 | /// <summary> |
2108 | /// Delete every object from the scene | 2136 | /// Delete every object from the scene |
@@ -3412,6 +3440,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3412 | 3440 | ||
3413 | CapsModule.AddCapsHandler(agent.AgentID); | 3441 | CapsModule.AddCapsHandler(agent.AgentID); |
3414 | 3442 | ||
3443 | if ((teleportFlags & ((uint)TeleportFlags.ViaLandmark | (uint)TeleportFlags.ViaLocation | (uint)TeleportFlags.ViaLandmark | (uint)TeleportFlags.Default)) != 0) | ||
3444 | System.Threading.Thread.Sleep(2000); | ||
3445 | |||
3415 | if (!agent.child) | 3446 | if (!agent.child) |
3416 | { | 3447 | { |
3417 | if (TestBorderCross(agent.startpos,Cardinals.E)) | 3448 | if (TestBorderCross(agent.startpos,Cardinals.E)) |
@@ -3470,6 +3501,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3470 | } | 3501 | } |
3471 | } | 3502 | } |
3472 | // Honor parcel landing type and position. | 3503 | // Honor parcel landing type and position. |
3504 | /* | ||
3505 | ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y); | ||
3473 | if (land != null) | 3506 | if (land != null) |
3474 | { | 3507 | { |
3475 | if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero) | 3508 | if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero) |
@@ -3477,6 +3510,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3477 | agent.startpos = land.LandData.UserLocation; | 3510 | agent.startpos = land.LandData.UserLocation; |
3478 | } | 3511 | } |
3479 | } | 3512 | } |
3513 | */// This is now handled properly in ScenePresence.MakeRootAgent | ||
3480 | } | 3514 | } |
3481 | 3515 | ||
3482 | agent.teleportFlags = teleportFlags; | 3516 | agent.teleportFlags = teleportFlags; |