diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 50 |
1 files changed, 42 insertions, 8 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index edbef4c..e920ff5 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -156,6 +156,20 @@ namespace OpenSim.Region.Framework.Scenes | |||
156 | 156 | ||
157 | public IXfer XferManager; | 157 | public IXfer XferManager; |
158 | 158 | ||
159 | protected ISnmpModule m_snmpService = null; | ||
160 | public ISnmpModule SnmpService | ||
161 | { | ||
162 | get | ||
163 | { | ||
164 | if (m_snmpService == null) | ||
165 | { | ||
166 | m_snmpService = RequestModuleInterface<ISnmpModule>(); | ||
167 | } | ||
168 | |||
169 | return m_snmpService; | ||
170 | } | ||
171 | } | ||
172 | |||
159 | protected IAssetService m_AssetService; | 173 | protected IAssetService m_AssetService; |
160 | protected IAuthorizationService m_AuthorizationService; | 174 | protected IAuthorizationService m_AuthorizationService; |
161 | 175 | ||
@@ -613,6 +627,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
613 | 627 | ||
614 | // Load region settings | 628 | // Load region settings |
615 | m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID); | 629 | m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID); |
630 | m_regInfo.WindlightSettings = m_storageManager.DataStore.LoadRegionWindlightSettings(m_regInfo.RegionID); | ||
631 | |||
616 | if (m_storageManager.EstateDataStore != null) | 632 | if (m_storageManager.EstateDataStore != null) |
617 | { | 633 | { |
618 | m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID, false); | 634 | m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID, false); |
@@ -711,7 +727,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
711 | m_useFlySlow = startupConfig.GetBoolean("enableflyslow", false); | 727 | m_useFlySlow = startupConfig.GetBoolean("enableflyslow", false); |
712 | // TODO: Change default to true once the feature is supported | 728 | // TODO: Change default to true once the feature is supported |
713 | m_usePreJump = startupConfig.GetBoolean("enableprejump", false); | 729 | m_usePreJump = startupConfig.GetBoolean("enableprejump", false); |
714 | 730 | m_usePreJump = true; // Above line fails!? | |
715 | m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", m_maxNonphys); | 731 | m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", m_maxNonphys); |
716 | if (RegionInfo.NonphysPrimMax > 0) | 732 | if (RegionInfo.NonphysPrimMax > 0) |
717 | { | 733 | { |
@@ -1031,6 +1047,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
1031 | /// <param name="seconds">float indicating duration before restart.</param> | 1047 | /// <param name="seconds">float indicating duration before restart.</param> |
1032 | public virtual void Restart(float seconds) | 1048 | public virtual void Restart(float seconds) |
1033 | { | 1049 | { |
1050 | Restart(seconds, true); | ||
1051 | } | ||
1052 | |||
1053 | /// <summary> | ||
1054 | /// Given float seconds, this will restart the region. showDialog will optionally alert the users. | ||
1055 | /// </summary> | ||
1056 | /// <param name="seconds">float indicating duration before restart.</param> | ||
1057 | public virtual void Restart(float seconds, bool showDialog) | ||
1058 | { | ||
1034 | // notifications are done in 15 second increments | 1059 | // notifications are done in 15 second increments |
1035 | // so .. if the number of seconds is less then 15 seconds, it's not really a restart request | 1060 | // so .. if the number of seconds is less then 15 seconds, it's not really a restart request |
1036 | // It's a 'Cancel restart' request. | 1061 | // It's a 'Cancel restart' request. |
@@ -1051,8 +1076,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1051 | m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); | 1076 | m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); |
1052 | m_log.Info("[REGION]: Restarting Region in " + (seconds / 60) + " minutes"); | 1077 | m_log.Info("[REGION]: Restarting Region in " + (seconds / 60) + " minutes"); |
1053 | m_restartTimer.Start(); | 1078 | m_restartTimer.Start(); |
1054 | m_dialogModule.SendNotificationToUsersInRegion( | 1079 | if (showDialog) |
1080 | { | ||
1081 | m_dialogModule.SendNotificationToUsersInRegion( | ||
1055 | UUID.Random(), String.Empty, RegionInfo.RegionName + String.Format(": Restarting in {0} Minutes", (int)(seconds / 60.0))); | 1082 | UUID.Random(), String.Empty, RegionInfo.RegionName + String.Format(": Restarting in {0} Minutes", (int)(seconds / 60.0))); |
1083 | } | ||
1056 | } | 1084 | } |
1057 | } | 1085 | } |
1058 | 1086 | ||
@@ -1408,16 +1436,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
1408 | // Check if any objects have reached their targets | 1436 | // Check if any objects have reached their targets |
1409 | CheckAtTargets(); | 1437 | CheckAtTargets(); |
1410 | 1438 | ||
1411 | // Update SceneObjectGroups that have scheduled themselves for updates | ||
1412 | // Objects queue their updates onto all scene presences | ||
1413 | if (m_frame % m_update_objects == 0) | ||
1414 | m_sceneGraph.UpdateObjectGroups(); | ||
1415 | |||
1416 | // Run through all ScenePresences looking for updates | 1439 | // Run through all ScenePresences looking for updates |
1417 | // Presence updates and queued object updates for each presence are sent to clients | 1440 | // Presence updates and queued object updates for each presence are sent to clients |
1418 | if (m_frame % m_update_presences == 0) | 1441 | if (m_frame % m_update_presences == 0) |
1419 | m_sceneGraph.UpdatePresences(); | 1442 | m_sceneGraph.UpdatePresences(); |
1420 | 1443 | ||
1444 | // Update SceneObjectGroups that have scheduled themselves for updates | ||
1445 | // Objects queue their updates onto all scene presences | ||
1446 | if (m_frame % m_update_objects == 0) | ||
1447 | m_sceneGraph.UpdateObjectGroups(); | ||
1448 | |||
1421 | int tmpPhysicsMS2 = Util.EnvironmentTickCount(); | 1449 | int tmpPhysicsMS2 = Util.EnvironmentTickCount(); |
1422 | if ((m_frame % m_update_physics == 0) && m_physics_enabled) | 1450 | if ((m_frame % m_update_physics == 0) && m_physics_enabled) |
1423 | m_sceneGraph.UpdatePreparePhysics(); | 1451 | m_sceneGraph.UpdatePreparePhysics(); |
@@ -2119,7 +2147,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2119 | public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates) | 2147 | public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates) |
2120 | { | 2148 | { |
2121 | return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, sendClientUpdates); | 2149 | return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, sendClientUpdates); |
2122 | } | 2150 | } |
2123 | 2151 | ||
2124 | /// <summary> | 2152 | /// <summary> |
2125 | /// Delete every object from the scene | 2153 | /// Delete every object from the scene |
@@ -3429,6 +3457,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3429 | 3457 | ||
3430 | CapsModule.AddCapsHandler(agent.AgentID); | 3458 | CapsModule.AddCapsHandler(agent.AgentID); |
3431 | 3459 | ||
3460 | if ((teleportFlags & ((uint)TeleportFlags.ViaLandmark | (uint)TeleportFlags.ViaLocation | (uint)TeleportFlags.ViaLandmark | (uint)TeleportFlags.Default)) != 0) | ||
3461 | System.Threading.Thread.Sleep(2000); | ||
3462 | |||
3432 | if (!agent.child) | 3463 | if (!agent.child) |
3433 | { | 3464 | { |
3434 | if (TestBorderCross(agent.startpos,Cardinals.E)) | 3465 | if (TestBorderCross(agent.startpos,Cardinals.E)) |
@@ -3487,6 +3518,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3487 | } | 3518 | } |
3488 | } | 3519 | } |
3489 | // Honor parcel landing type and position. | 3520 | // Honor parcel landing type and position. |
3521 | /* | ||
3522 | ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y); | ||
3490 | if (land != null) | 3523 | if (land != null) |
3491 | { | 3524 | { |
3492 | if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero) | 3525 | if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero) |
@@ -3494,6 +3527,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3494 | agent.startpos = land.LandData.UserLocation; | 3527 | agent.startpos = land.LandData.UserLocation; |
3495 | } | 3528 | } |
3496 | } | 3529 | } |
3530 | */// This is now handled properly in ScenePresence.MakeRootAgent | ||
3497 | } | 3531 | } |
3498 | 3532 | ||
3499 | agent.teleportFlags = teleportFlags; | 3533 | agent.teleportFlags = teleportFlags; |