aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs44
1 files changed, 38 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 5e5a52e..181b7c5 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>
@@ -3244,6 +3271,9 @@ namespace OpenSim.Region.Framework.Scenes
3244 3271
3245 CapsModule.AddCapsHandler(agent.AgentID); 3272 CapsModule.AddCapsHandler(agent.AgentID);
3246 3273
3274 if ((teleportFlags & ((uint)TeleportFlags.ViaLandmark | (uint)TeleportFlags.ViaLocation | (uint)TeleportFlags.ViaLandmark | (uint)TeleportFlags.Default)) != 0)
3275 System.Threading.Thread.Sleep(2000);
3276
3247 if (!agent.child) 3277 if (!agent.child)
3248 { 3278 {
3249 if (TestBorderCross(agent.startpos,Cardinals.E)) 3279 if (TestBorderCross(agent.startpos,Cardinals.E))
@@ -3302,6 +3332,7 @@ namespace OpenSim.Region.Framework.Scenes
3302 } 3332 }
3303 } 3333 }
3304 // Honor parcel landing type and position. 3334 // Honor parcel landing type and position.
3335 /*
3305 ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y); 3336 ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y);
3306 if (land != null) 3337 if (land != null)
3307 { 3338 {
@@ -3310,6 +3341,7 @@ namespace OpenSim.Region.Framework.Scenes
3310 agent.startpos = land.LandData.UserLocation; 3341 agent.startpos = land.LandData.UserLocation;
3311 } 3342 }
3312 } 3343 }
3344 */// This is now handled properly in ScenePresence.MakeRootAgent
3313 } 3345 }
3314 3346
3315 agent.teleportFlags = teleportFlags; 3347 agent.teleportFlags = teleportFlags;