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 a86a33c..b2c8dfd 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); | 609 | m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID); |
@@ -977,6 +979,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
977 | /// <param name="seconds">float indicating duration before restart.</param> | 979 | /// <param name="seconds">float indicating duration before restart.</param> |
978 | public virtual void Restart(float seconds) | 980 | public virtual void Restart(float seconds) |
979 | { | 981 | { |
982 | Restart(seconds, true); | ||
983 | } | ||
984 | |||
985 | /// <summary> | ||
986 | /// Given float seconds, this will restart the region. showDialog will optionally alert the users. | ||
987 | /// </summary> | ||
988 | /// <param name="seconds">float indicating duration before restart.</param> | ||
989 | public virtual void Restart(float seconds, bool showDialog) | ||
990 | { | ||
980 | // notifications are done in 15 second increments | 991 | // notifications are done in 15 second increments |
981 | // so .. if the number of seconds is less then 15 seconds, it's not really a restart request | 992 | // so .. if the number of seconds is less then 15 seconds, it's not really a restart request |
982 | // It's a 'Cancel restart' request. | 993 | // It's a 'Cancel restart' request. |
@@ -997,8 +1008,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
997 | m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); | 1008 | m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); |
998 | m_log.Info("[REGION]: Restarting Region in " + (seconds / 60) + " minutes"); | 1009 | m_log.Info("[REGION]: Restarting Region in " + (seconds / 60) + " minutes"); |
999 | m_restartTimer.Start(); | 1010 | m_restartTimer.Start(); |
1000 | m_dialogModule.SendNotificationToUsersInRegion( | 1011 | if (showDialog) |
1012 | { | ||
1013 | m_dialogModule.SendNotificationToUsersInRegion( | ||
1001 | UUID.Random(), String.Empty, RegionInfo.RegionName + String.Format(": Restarting in {0} Minutes", (int)(seconds / 60.0))); | 1014 | UUID.Random(), String.Empty, RegionInfo.RegionName + String.Format(": Restarting in {0} Minutes", (int)(seconds / 60.0))); |
1015 | } | ||
1002 | } | 1016 | } |
1003 | } | 1017 | } |
1004 | 1018 | ||
@@ -1276,16 +1290,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
1276 | // Check if any objects have reached their targets | 1290 | // Check if any objects have reached their targets |
1277 | CheckAtTargets(); | 1291 | CheckAtTargets(); |
1278 | 1292 | ||
1279 | // Update SceneObjectGroups that have scheduled themselves for updates | ||
1280 | // Objects queue their updates onto all scene presences | ||
1281 | if (m_frame % m_update_objects == 0) | ||
1282 | m_sceneGraph.UpdateObjectGroups(); | ||
1283 | |||
1284 | // Run through all ScenePresences looking for updates | 1293 | // Run through all ScenePresences looking for updates |
1285 | // Presence updates and queued object updates for each presence are sent to clients | 1294 | // Presence updates and queued object updates for each presence are sent to clients |
1286 | if (m_frame % m_update_presences == 0) | 1295 | if (m_frame % m_update_presences == 0) |
1287 | m_sceneGraph.UpdatePresences(); | 1296 | m_sceneGraph.UpdatePresences(); |
1288 | 1297 | ||
1298 | // Update SceneObjectGroups that have scheduled themselves for updates | ||
1299 | // Objects queue their updates onto all scene presences | ||
1300 | if (m_frame % m_update_objects == 0) | ||
1301 | m_sceneGraph.UpdateObjectGroups(); | ||
1302 | |||
1289 | int tmpPhysicsMS2 = Util.EnvironmentTickCount(); | 1303 | int tmpPhysicsMS2 = Util.EnvironmentTickCount(); |
1290 | if ((m_frame % m_update_physics == 0) && m_physics_enabled) | 1304 | if ((m_frame % m_update_physics == 0) && m_physics_enabled) |
1291 | m_sceneGraph.UpdatePreparePhysics(); | 1305 | m_sceneGraph.UpdatePreparePhysics(); |
@@ -1596,6 +1610,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
1596 | public void SaveTerrain() | 1610 | public void SaveTerrain() |
1597 | { | 1611 | { |
1598 | m_storageManager.DataStore.StoreTerrain(Heightmap.GetDoubles(), RegionInfo.RegionID); | 1612 | m_storageManager.DataStore.StoreTerrain(Heightmap.GetDoubles(), RegionInfo.RegionID); |
1613 | } | ||
1614 | |||
1615 | public void StoreWindlightProfile(RegionMeta7WindlightData wl) | ||
1616 | { | ||
1617 | m_regInfo.WindlightSettings = wl; | ||
1618 | m_storageManager.DataStore.StoreRegionWindlightSettings(wl); | ||
1619 | m_eventManager.TriggerOnSaveNewWindlightProfile(); | ||
1620 | } | ||
1621 | |||
1622 | public void LoadWindlightProfile() | ||
1623 | { | ||
1624 | m_regInfo.WindlightSettings = m_storageManager.DataStore.LoadRegionWindlightSettings(RegionInfo.RegionID); | ||
1625 | m_eventManager.TriggerOnSaveNewWindlightProfile(); | ||
1599 | } | 1626 | } |
1600 | 1627 | ||
1601 | /// <summary> | 1628 | /// <summary> |
@@ -3283,6 +3310,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3283 | 3310 | ||
3284 | CapsModule.AddCapsHandler(agent.AgentID); | 3311 | CapsModule.AddCapsHandler(agent.AgentID); |
3285 | 3312 | ||
3313 | if ((teleportFlags & ((uint)TeleportFlags.ViaLandmark | (uint)TeleportFlags.ViaLocation | (uint)TeleportFlags.ViaLandmark | (uint)TeleportFlags.Default)) != 0) | ||
3314 | System.Threading.Thread.Sleep(2000); | ||
3315 | |||
3286 | if (!agent.child) | 3316 | if (!agent.child) |
3287 | { | 3317 | { |
3288 | if (TestBorderCross(agent.startpos,Cardinals.E)) | 3318 | if (TestBorderCross(agent.startpos,Cardinals.E)) |
@@ -3341,6 +3371,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3341 | } | 3371 | } |
3342 | } | 3372 | } |
3343 | // Honor parcel landing type and position. | 3373 | // Honor parcel landing type and position. |
3374 | /* | ||
3375 | ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y); | ||
3344 | if (land != null) | 3376 | if (land != null) |
3345 | { | 3377 | { |
3346 | if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero) | 3378 | if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero) |
@@ -3348,6 +3380,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3348 | agent.startpos = land.LandData.UserLocation; | 3380 | agent.startpos = land.LandData.UserLocation; |
3349 | } | 3381 | } |
3350 | } | 3382 | } |
3383 | */// This is now handled properly in ScenePresence.MakeRootAgent | ||
3351 | } | 3384 | } |
3352 | 3385 | ||
3353 | agent.teleportFlags = teleportFlags; | 3386 | agent.teleportFlags = teleportFlags; |