diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 45 |
1 files changed, 39 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 0085df3..2b6f80b 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -602,6 +602,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
602 | 602 | ||
603 | // Load region settings | 603 | // Load region settings |
604 | m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID); | 604 | m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID); |
605 | m_regInfo.WindlightSettings = m_storageManager.DataStore.LoadRegionWindlightSettings(m_regInfo.RegionID); | ||
606 | |||
605 | if (m_storageManager.EstateDataStore != null) | 607 | if (m_storageManager.EstateDataStore != null) |
606 | { | 608 | { |
607 | m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID, false); | 609 | m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID, false); |
@@ -1016,6 +1018,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
1016 | /// <param name="seconds">float indicating duration before restart.</param> | 1018 | /// <param name="seconds">float indicating duration before restart.</param> |
1017 | public virtual void Restart(float seconds) | 1019 | public virtual void Restart(float seconds) |
1018 | { | 1020 | { |
1021 | Restart(seconds, true); | ||
1022 | } | ||
1023 | |||
1024 | /// <summary> | ||
1025 | /// Given float seconds, this will restart the region. showDialog will optionally alert the users. | ||
1026 | /// </summary> | ||
1027 | /// <param name="seconds">float indicating duration before restart.</param> | ||
1028 | public virtual void Restart(float seconds, bool showDialog) | ||
1029 | { | ||
1019 | // notifications are done in 15 second increments | 1030 | // 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 | 1031 | // 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. | 1032 | // It's a 'Cancel restart' request. |
@@ -1036,8 +1047,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1036 | m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); | 1047 | m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); |
1037 | m_log.Info("[REGION]: Restarting Region in " + (seconds / 60) + " minutes"); | 1048 | m_log.Info("[REGION]: Restarting Region in " + (seconds / 60) + " minutes"); |
1038 | m_restartTimer.Start(); | 1049 | m_restartTimer.Start(); |
1039 | m_dialogModule.SendNotificationToUsersInRegion( | 1050 | if (showDialog) |
1051 | { | ||
1052 | m_dialogModule.SendNotificationToUsersInRegion( | ||
1040 | UUID.Random(), String.Empty, RegionInfo.RegionName + String.Format(": Restarting in {0} Minutes", (int)(seconds / 60.0))); | 1053 | UUID.Random(), String.Empty, RegionInfo.RegionName + String.Format(": Restarting in {0} Minutes", (int)(seconds / 60.0))); |
1054 | } | ||
1041 | } | 1055 | } |
1042 | } | 1056 | } |
1043 | 1057 | ||
@@ -1393,16 +1407,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
1393 | // Check if any objects have reached their targets | 1407 | // Check if any objects have reached their targets |
1394 | CheckAtTargets(); | 1408 | CheckAtTargets(); |
1395 | 1409 | ||
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 | 1410 | // Run through all ScenePresences looking for updates |
1402 | // Presence updates and queued object updates for each presence are sent to clients | 1411 | // Presence updates and queued object updates for each presence are sent to clients |
1403 | if (m_frame % m_update_presences == 0) | 1412 | if (m_frame % m_update_presences == 0) |
1404 | m_sceneGraph.UpdatePresences(); | 1413 | m_sceneGraph.UpdatePresences(); |
1405 | 1414 | ||
1415 | // Update SceneObjectGroups that have scheduled themselves for updates | ||
1416 | // Objects queue their updates onto all scene presences | ||
1417 | if (m_frame % m_update_objects == 0) | ||
1418 | m_sceneGraph.UpdateObjectGroups(); | ||
1419 | |||
1406 | int tmpPhysicsMS2 = Util.EnvironmentTickCount(); | 1420 | int tmpPhysicsMS2 = Util.EnvironmentTickCount(); |
1407 | if ((m_frame % m_update_physics == 0) && m_physics_enabled) | 1421 | if ((m_frame % m_update_physics == 0) && m_physics_enabled) |
1408 | m_sceneGraph.UpdatePreparePhysics(); | 1422 | m_sceneGraph.UpdatePreparePhysics(); |
@@ -1713,6 +1727,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
1713 | public void SaveTerrain() | 1727 | public void SaveTerrain() |
1714 | { | 1728 | { |
1715 | m_storageManager.DataStore.StoreTerrain(Heightmap.GetDoubles(), RegionInfo.RegionID); | 1729 | m_storageManager.DataStore.StoreTerrain(Heightmap.GetDoubles(), RegionInfo.RegionID); |
1730 | } | ||
1731 | |||
1732 | public void StoreWindlightProfile(RegionMeta7WindlightData wl) | ||
1733 | { | ||
1734 | m_regInfo.WindlightSettings = wl; | ||
1735 | m_storageManager.DataStore.StoreRegionWindlightSettings(wl); | ||
1736 | m_eventManager.TriggerOnSaveNewWindlightProfile(); | ||
1737 | } | ||
1738 | |||
1739 | public void LoadWindlightProfile() | ||
1740 | { | ||
1741 | m_regInfo.WindlightSettings = m_storageManager.DataStore.LoadRegionWindlightSettings(RegionInfo.RegionID); | ||
1742 | m_eventManager.TriggerOnSaveNewWindlightProfile(); | ||
1716 | } | 1743 | } |
1717 | 1744 | ||
1718 | /// <summary> | 1745 | /// <summary> |
@@ -3400,6 +3427,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3400 | 3427 | ||
3401 | CapsModule.AddCapsHandler(agent.AgentID); | 3428 | CapsModule.AddCapsHandler(agent.AgentID); |
3402 | 3429 | ||
3430 | if ((teleportFlags & ((uint)TeleportFlags.ViaLandmark | (uint)TeleportFlags.ViaLocation | (uint)TeleportFlags.ViaLandmark | (uint)TeleportFlags.Default)) != 0) | ||
3431 | System.Threading.Thread.Sleep(2000); | ||
3432 | |||
3403 | if (!agent.child) | 3433 | if (!agent.child) |
3404 | { | 3434 | { |
3405 | if (TestBorderCross(agent.startpos,Cardinals.E)) | 3435 | if (TestBorderCross(agent.startpos,Cardinals.E)) |
@@ -3458,6 +3488,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3458 | } | 3488 | } |
3459 | } | 3489 | } |
3460 | // Honor parcel landing type and position. | 3490 | // Honor parcel landing type and position. |
3491 | /* | ||
3492 | ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y); | ||
3461 | if (land != null) | 3493 | if (land != null) |
3462 | { | 3494 | { |
3463 | if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero) | 3495 | if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero) |
@@ -3465,6 +3497,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3465 | agent.startpos = land.LandData.UserLocation; | 3497 | agent.startpos = land.LandData.UserLocation; |
3466 | } | 3498 | } |
3467 | } | 3499 | } |
3500 | */// This is now handled properly in ScenePresence.MakeRootAgent | ||
3468 | } | 3501 | } |
3469 | 3502 | ||
3470 | agent.teleportFlags = teleportFlags; | 3503 | agent.teleportFlags = teleportFlags; |