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 a880fe7..a84f966 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -601,6 +601,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
601 | 601 | ||
602 | // Load region settings | 602 | // Load region settings |
603 | m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID); | 603 | m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID); |
604 | m_regInfo.WindlightSettings = m_storageManager.DataStore.LoadRegionWindlightSettings(m_regInfo.RegionID); | ||
605 | |||
604 | if (m_storageManager.EstateDataStore != null) | 606 | if (m_storageManager.EstateDataStore != null) |
605 | { | 607 | { |
606 | m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID); | 608 | m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID); |
@@ -979,6 +981,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
979 | /// <param name="seconds">float indicating duration before restart.</param> | 981 | /// <param name="seconds">float indicating duration before restart.</param> |
980 | public virtual void Restart(float seconds) | 982 | public virtual void Restart(float seconds) |
981 | { | 983 | { |
984 | Restart(seconds, true); | ||
985 | } | ||
986 | |||
987 | /// <summary> | ||
988 | /// Given float seconds, this will restart the region. showDialog will optionally alert the users. | ||
989 | /// </summary> | ||
990 | /// <param name="seconds">float indicating duration before restart.</param> | ||
991 | public virtual void Restart(float seconds, bool showDialog) | ||
992 | { | ||
982 | // notifications are done in 15 second increments | 993 | // notifications are done in 15 second increments |
983 | // so .. if the number of seconds is less then 15 seconds, it's not really a restart request | 994 | // so .. if the number of seconds is less then 15 seconds, it's not really a restart request |
984 | // It's a 'Cancel restart' request. | 995 | // It's a 'Cancel restart' request. |
@@ -999,8 +1010,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
999 | m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); | 1010 | m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); |
1000 | m_log.Info("[REGION]: Restarting Region in " + (seconds / 60) + " minutes"); | 1011 | m_log.Info("[REGION]: Restarting Region in " + (seconds / 60) + " minutes"); |
1001 | m_restartTimer.Start(); | 1012 | m_restartTimer.Start(); |
1002 | m_dialogModule.SendNotificationToUsersInRegion( | 1013 | if (showDialog) |
1014 | { | ||
1015 | m_dialogModule.SendNotificationToUsersInRegion( | ||
1003 | UUID.Random(), String.Empty, RegionInfo.RegionName + String.Format(": Restarting in {0} Minutes", (int)(seconds / 60.0))); | 1016 | UUID.Random(), String.Empty, RegionInfo.RegionName + String.Format(": Restarting in {0} Minutes", (int)(seconds / 60.0))); |
1017 | } | ||
1004 | } | 1018 | } |
1005 | } | 1019 | } |
1006 | 1020 | ||
@@ -1280,16 +1294,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
1280 | // Check if any objects have reached their targets | 1294 | // Check if any objects have reached their targets |
1281 | CheckAtTargets(); | 1295 | CheckAtTargets(); |
1282 | 1296 | ||
1283 | // Update SceneObjectGroups that have scheduled themselves for updates | ||
1284 | // Objects queue their updates onto all scene presences | ||
1285 | if (m_frame % m_update_objects == 0) | ||
1286 | m_sceneGraph.UpdateObjectGroups(); | ||
1287 | |||
1288 | // Run through all ScenePresences looking for updates | 1297 | // Run through all ScenePresences looking for updates |
1289 | // Presence updates and queued object updates for each presence are sent to clients | 1298 | // Presence updates and queued object updates for each presence are sent to clients |
1290 | if (m_frame % m_update_presences == 0) | 1299 | if (m_frame % m_update_presences == 0) |
1291 | m_sceneGraph.UpdatePresences(); | 1300 | m_sceneGraph.UpdatePresences(); |
1292 | 1301 | ||
1302 | // Update SceneObjectGroups that have scheduled themselves for updates | ||
1303 | // Objects queue their updates onto all scene presences | ||
1304 | if (m_frame % m_update_objects == 0) | ||
1305 | m_sceneGraph.UpdateObjectGroups(); | ||
1306 | |||
1293 | int tmpPhysicsMS2 = Util.EnvironmentTickCount(); | 1307 | int tmpPhysicsMS2 = Util.EnvironmentTickCount(); |
1294 | if ((m_frame % m_update_physics == 0) && m_physics_enabled) | 1308 | if ((m_frame % m_update_physics == 0) && m_physics_enabled) |
1295 | m_sceneGraph.UpdatePreparePhysics(); | 1309 | m_sceneGraph.UpdatePreparePhysics(); |
@@ -1600,6 +1614,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
1600 | public void SaveTerrain() | 1614 | public void SaveTerrain() |
1601 | { | 1615 | { |
1602 | m_storageManager.DataStore.StoreTerrain(Heightmap.GetDoubles(), RegionInfo.RegionID); | 1616 | m_storageManager.DataStore.StoreTerrain(Heightmap.GetDoubles(), RegionInfo.RegionID); |
1617 | } | ||
1618 | |||
1619 | public void StoreWindlightProfile(RegionMeta7WindlightData wl) | ||
1620 | { | ||
1621 | m_regInfo.WindlightSettings = wl; | ||
1622 | m_storageManager.DataStore.StoreRegionWindlightSettings(wl); | ||
1623 | m_eventManager.TriggerOnSaveNewWindlightProfile(); | ||
1624 | } | ||
1625 | |||
1626 | public void LoadWindlightProfile() | ||
1627 | { | ||
1628 | m_regInfo.WindlightSettings = m_storageManager.DataStore.LoadRegionWindlightSettings(RegionInfo.RegionID); | ||
1629 | m_eventManager.TriggerOnSaveNewWindlightProfile(); | ||
1603 | } | 1630 | } |
1604 | 1631 | ||
1605 | /// <summary> | 1632 | /// <summary> |
@@ -3268,6 +3295,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3268 | 3295 | ||
3269 | CapsModule.AddCapsHandler(agent.AgentID); | 3296 | CapsModule.AddCapsHandler(agent.AgentID); |
3270 | 3297 | ||
3298 | if ((teleportFlags & ((uint)TeleportFlags.ViaLandmark | (uint)TeleportFlags.ViaLocation | (uint)TeleportFlags.ViaLandmark | (uint)TeleportFlags.Default)) != 0) | ||
3299 | System.Threading.Thread.Sleep(2000); | ||
3300 | |||
3271 | if (!agent.child) | 3301 | if (!agent.child) |
3272 | { | 3302 | { |
3273 | if (TestBorderCross(agent.startpos,Cardinals.E)) | 3303 | if (TestBorderCross(agent.startpos,Cardinals.E)) |
@@ -3326,6 +3356,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3326 | } | 3356 | } |
3327 | } | 3357 | } |
3328 | // Honor parcel landing type and position. | 3358 | // Honor parcel landing type and position. |
3359 | /* | ||
3329 | ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y); | 3360 | ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y); |
3330 | if (land != null) | 3361 | if (land != null) |
3331 | { | 3362 | { |
@@ -3334,6 +3365,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3334 | agent.startpos = land.LandData.UserLocation; | 3365 | agent.startpos = land.LandData.UserLocation; |
3335 | } | 3366 | } |
3336 | } | 3367 | } |
3368 | */// This is now handled properly in ScenePresence.MakeRootAgent | ||
3337 | } | 3369 | } |
3338 | 3370 | ||
3339 | agent.teleportFlags = teleportFlags; | 3371 | agent.teleportFlags = teleportFlags; |