diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 44 |
1 files changed, 38 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 764ac60..adf5f02 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -539,6 +539,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
539 | 539 | ||
540 | // Load region settings | 540 | // Load region settings |
541 | m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID); | 541 | m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID); |
542 | m_regInfo.WindlightSettings = m_storageManager.DataStore.LoadRegionWindlightSettings(m_regInfo.RegionID); | ||
543 | |||
542 | if (m_storageManager.EstateDataStore != null) | 544 | if (m_storageManager.EstateDataStore != null) |
543 | { | 545 | { |
544 | m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID); | 546 | m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID); |
@@ -886,6 +888,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
886 | /// <param name="seconds">float indicating duration before restart.</param> | 888 | /// <param name="seconds">float indicating duration before restart.</param> |
887 | public virtual void Restart(float seconds) | 889 | public virtual void Restart(float seconds) |
888 | { | 890 | { |
891 | Restart(seconds, true); | ||
892 | } | ||
893 | |||
894 | /// <summary> | ||
895 | /// Given float seconds, this will restart the region. showDialog will optionally alert the users. | ||
896 | /// </summary> | ||
897 | /// <param name="seconds">float indicating duration before restart.</param> | ||
898 | public virtual void Restart(float seconds, bool showDialog) | ||
899 | { | ||
889 | // notifications are done in 15 second increments | 900 | // notifications are done in 15 second increments |
890 | // so .. if the number of seconds is less then 15 seconds, it's not really a restart request | 901 | // so .. if the number of seconds is less then 15 seconds, it's not really a restart request |
891 | // It's a 'Cancel restart' request. | 902 | // It's a 'Cancel restart' request. |
@@ -906,8 +917,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
906 | m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); | 917 | m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); |
907 | m_log.Info("[REGION]: Restarting Region in " + (seconds / 60) + " minutes"); | 918 | m_log.Info("[REGION]: Restarting Region in " + (seconds / 60) + " minutes"); |
908 | m_restartTimer.Start(); | 919 | m_restartTimer.Start(); |
909 | m_dialogModule.SendNotificationToUsersInRegion( | 920 | if (showDialog) |
921 | { | ||
922 | m_dialogModule.SendNotificationToUsersInRegion( | ||
910 | UUID.Random(), String.Empty, RegionInfo.RegionName + String.Format(": Restarting in {0} Minutes", (int)(seconds / 60.0))); | 923 | UUID.Random(), String.Empty, RegionInfo.RegionName + String.Format(": Restarting in {0} Minutes", (int)(seconds / 60.0))); |
924 | } | ||
911 | } | 925 | } |
912 | } | 926 | } |
913 | 927 | ||
@@ -1189,16 +1203,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
1189 | // Check if any objects have reached their targets | 1203 | // Check if any objects have reached their targets |
1190 | CheckAtTargets(); | 1204 | CheckAtTargets(); |
1191 | 1205 | ||
1192 | // Update SceneObjectGroups that have scheduled themselves for updates | ||
1193 | // Objects queue their updates onto all scene presences | ||
1194 | if (m_frame % m_update_objects == 0) | ||
1195 | m_sceneGraph.UpdateObjectGroups(); | ||
1196 | |||
1197 | // Run through all ScenePresences looking for updates | 1206 | // Run through all ScenePresences looking for updates |
1198 | // Presence updates and queued object updates for each presence are sent to clients | 1207 | // Presence updates and queued object updates for each presence are sent to clients |
1199 | if (m_frame % m_update_presences == 0) | 1208 | if (m_frame % m_update_presences == 0) |
1200 | m_sceneGraph.UpdatePresences(); | 1209 | m_sceneGraph.UpdatePresences(); |
1201 | 1210 | ||
1211 | // Update SceneObjectGroups that have scheduled themselves for updates | ||
1212 | // Objects queue their updates onto all scene presences | ||
1213 | if (m_frame % m_update_objects == 0) | ||
1214 | m_sceneGraph.UpdateObjectGroups(); | ||
1215 | |||
1202 | int tmpPhysicsMS2 = Util.EnvironmentTickCount(); | 1216 | int tmpPhysicsMS2 = Util.EnvironmentTickCount(); |
1203 | if ((m_frame % m_update_physics == 0) && m_physics_enabled) | 1217 | if ((m_frame % m_update_physics == 0) && m_physics_enabled) |
1204 | m_sceneGraph.UpdatePreparePhysics(); | 1218 | m_sceneGraph.UpdatePreparePhysics(); |
@@ -1505,6 +1519,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
1505 | public void SaveTerrain() | 1519 | public void SaveTerrain() |
1506 | { | 1520 | { |
1507 | m_storageManager.DataStore.StoreTerrain(Heightmap.GetDoubles(), RegionInfo.RegionID); | 1521 | m_storageManager.DataStore.StoreTerrain(Heightmap.GetDoubles(), RegionInfo.RegionID); |
1522 | } | ||
1523 | |||
1524 | public void StoreWindlightProfile(RegionMeta7WindlightData wl) | ||
1525 | { | ||
1526 | m_regInfo.WindlightSettings = wl; | ||
1527 | m_storageManager.DataStore.StoreRegionWindlightSettings(wl); | ||
1528 | m_eventManager.TriggerOnSaveNewWindlightProfile(); | ||
1529 | } | ||
1530 | |||
1531 | public void LoadWindlightProfile() | ||
1532 | { | ||
1533 | m_regInfo.WindlightSettings = m_storageManager.DataStore.LoadRegionWindlightSettings(RegionInfo.RegionID); | ||
1534 | m_eventManager.TriggerOnSaveNewWindlightProfile(); | ||
1508 | } | 1535 | } |
1509 | 1536 | ||
1510 | /// <summary> | 1537 | /// <summary> |
@@ -3387,6 +3414,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3387 | 3414 | ||
3388 | CapsModule.AddCapsHandler(agent.AgentID); | 3415 | CapsModule.AddCapsHandler(agent.AgentID); |
3389 | 3416 | ||
3417 | if ((teleportFlags & ((uint)TeleportFlags.ViaLandmark | (uint)TeleportFlags.ViaLocation | (uint)TeleportFlags.ViaLandmark | (uint)TeleportFlags.Default)) != 0) | ||
3418 | System.Threading.Thread.Sleep(2000); | ||
3419 | |||
3390 | if (!agent.child) | 3420 | if (!agent.child) |
3391 | { | 3421 | { |
3392 | if (TestBorderCross(agent.startpos,Cardinals.E)) | 3422 | if (TestBorderCross(agent.startpos,Cardinals.E)) |
@@ -3445,6 +3475,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3445 | } | 3475 | } |
3446 | } | 3476 | } |
3447 | // Honor parcel landing type and position. | 3477 | // Honor parcel landing type and position. |
3478 | /* | ||
3448 | ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y); | 3479 | ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y); |
3449 | if (land != null) | 3480 | if (land != null) |
3450 | { | 3481 | { |
@@ -3453,6 +3484,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3453 | agent.startpos = land.LandData.UserLocation; | 3484 | agent.startpos = land.LandData.UserLocation; |
3454 | } | 3485 | } |
3455 | } | 3486 | } |
3487 | */// This is now handled properly in ScenePresence.MakeRootAgent | ||
3456 | } | 3488 | } |
3457 | 3489 | ||
3458 | m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent); | 3490 | m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent); |