diff options
Diffstat (limited to 'OpenSim/Region/Framework')
-rwxr-xr-x | OpenSim/Region/Framework/Scenes/Scene.cs | 31 | ||||
-rwxr-xr-x | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 8 |
3 files changed, 29 insertions, 16 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 55c4fda..8bdf39a 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -174,6 +174,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
174 | 174 | ||
175 | public SynchronizeSceneHandler SynchronizeScene; | 175 | public SynchronizeSceneHandler SynchronizeScene; |
176 | 176 | ||
177 | public bool ClampNegativeZ | ||
178 | { | ||
179 | get { return m_clampNegativeZ; } | ||
180 | } | ||
181 | |||
182 | private bool m_clampNegativeZ = false; | ||
183 | |||
177 | /// <summary> | 184 | /// <summary> |
178 | /// Used to prevent simultaneous calls to code that adds and removes agents. | 185 | /// Used to prevent simultaneous calls to code that adds and removes agents. |
179 | /// </summary> | 186 | /// </summary> |
@@ -524,11 +531,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
524 | // private int m_lastUpdate; | 531 | // private int m_lastUpdate; |
525 | private bool m_firstHeartbeat = true; | 532 | private bool m_firstHeartbeat = true; |
526 | 533 | ||
527 | private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time; | 534 | // private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time; |
528 | private bool m_reprioritizationEnabled = true; | 535 | // private bool m_reprioritizationEnabled = true; |
529 | private double m_reprioritizationInterval = 5000.0; | 536 | // private double m_reprioritizationInterval = 5000.0; |
530 | private double m_rootReprioritizationDistance = 10.0; | 537 | // private double m_rootReprioritizationDistance = 10.0; |
531 | private double m_childReprioritizationDistance = 20.0; | 538 | // private double m_childReprioritizationDistance = 20.0; |
532 | 539 | ||
533 | 540 | ||
534 | private Timer m_mapGenerationTimer = new Timer(); | 541 | private Timer m_mapGenerationTimer = new Timer(); |
@@ -1029,6 +1036,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1029 | m_clampPrimSize = true; | 1036 | m_clampPrimSize = true; |
1030 | } | 1037 | } |
1031 | 1038 | ||
1039 | m_clampNegativeZ = startupConfig.GetBoolean("ClampNegativeZ", m_clampNegativeZ); | ||
1040 | |||
1032 | m_useTrashOnDelete = startupConfig.GetBoolean("UseTrashOnDelete",m_useTrashOnDelete); | 1041 | m_useTrashOnDelete = startupConfig.GetBoolean("UseTrashOnDelete",m_useTrashOnDelete); |
1033 | m_trustBinaries = startupConfig.GetBoolean("TrustBinaries", m_trustBinaries); | 1042 | m_trustBinaries = startupConfig.GetBoolean("TrustBinaries", m_trustBinaries); |
1034 | m_allowScriptCrossings = startupConfig.GetBoolean("AllowScriptCrossing", m_allowScriptCrossings); | 1043 | m_allowScriptCrossings = startupConfig.GetBoolean("AllowScriptCrossing", m_allowScriptCrossings); |
@@ -1472,11 +1481,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
1472 | 1481 | ||
1473 | m_log.InfoFormat("[SCENE]: Closing down the single simulator: {0}", RegionInfo.RegionName); | 1482 | m_log.InfoFormat("[SCENE]: Closing down the single simulator: {0}", RegionInfo.RegionName); |
1474 | 1483 | ||
1475 | StatsReporter.Close(); | ||
1476 | 1484 | ||
1485 | StatsReporter.Close(); | ||
1477 | m_restartTimer.Stop(); | 1486 | m_restartTimer.Stop(); |
1478 | m_restartTimer.Close(); | 1487 | m_restartTimer.Close(); |
1479 | 1488 | ||
1489 | if (!GridService.DeregisterRegion(RegionInfo.RegionID)) | ||
1490 | m_log.WarnFormat("[SCENE]: Deregister from grid failed for region {0}", Name); | ||
1491 | |||
1480 | // Kick all ROOT agents with the message, 'The simulator is going down' | 1492 | // Kick all ROOT agents with the message, 'The simulator is going down' |
1481 | ForEachScenePresence(delegate(ScenePresence avatar) | 1493 | ForEachScenePresence(delegate(ScenePresence avatar) |
1482 | { | 1494 | { |
@@ -1503,13 +1515,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
1503 | EventManager.TriggerSceneShuttingDown(this); | 1515 | EventManager.TriggerSceneShuttingDown(this); |
1504 | 1516 | ||
1505 | m_log.Debug("[SCENE]: Persisting changed objects"); | 1517 | m_log.Debug("[SCENE]: Persisting changed objects"); |
1518 | Backup(true); | ||
1506 | 1519 | ||
1507 | Backup(false); | ||
1508 | m_sceneGraph.Close(); | 1520 | m_sceneGraph.Close(); |
1509 | 1521 | ||
1510 | if (!GridService.DeregisterRegion(RegionInfo.RegionID)) | ||
1511 | m_log.WarnFormat("[SCENE]: Deregister from grid failed for region {0}", Name); | ||
1512 | |||
1513 | base.Close(); | 1522 | base.Close(); |
1514 | 1523 | ||
1515 | // XEngine currently listens to the EventManager.OnShutdown event to trigger script stop and persistence. | 1524 | // XEngine currently listens to the EventManager.OnShutdown event to trigger script stop and persistence. |
@@ -1619,6 +1628,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1619 | Watchdog.GetCurrentThreadInfo().AlarmIfTimeout = true; | 1628 | Watchdog.GetCurrentThreadInfo().AlarmIfTimeout = true; |
1620 | m_lastFrameTick = Util.EnvironmentTickCount(); | 1629 | m_lastFrameTick = Util.EnvironmentTickCount(); |
1621 | Update(-1); | 1630 | Update(-1); |
1631 | |||
1632 | Watchdog.RemoveThread(); | ||
1622 | } | 1633 | } |
1623 | 1634 | ||
1624 | private void Maintenance() | 1635 | private void Maintenance() |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 9308500..2ecb55b 100755 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -296,13 +296,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
296 | Vector3 npos = new Vector3(sceneObject.RootPart.GroupPosition.X, | 296 | Vector3 npos = new Vector3(sceneObject.RootPart.GroupPosition.X, |
297 | sceneObject.RootPart.GroupPosition.Y, | 297 | sceneObject.RootPart.GroupPosition.Y, |
298 | sceneObject.RootPart.GroupPosition.Z); | 298 | sceneObject.RootPart.GroupPosition.Z); |
299 | if (!(((sceneObject.RootPart.Shape.PCode == (byte)PCode.Prim) && (sceneObject.RootPart.Shape.State != 0))) && (npos.X < 0.0 || npos.Y < 0.0 || npos.Z < 0.0 || | 299 | bool clampZ = m_parentScene.ClampNegativeZ; |
300 | |||
301 | if (!(((sceneObject.RootPart.Shape.PCode == (byte)PCode.Prim) && (sceneObject.RootPart.Shape.State != 0))) && (npos.X < 0.0 || npos.Y < 0.0 || (npos.Z < 0.0 && clampZ) || | ||
300 | npos.X > regionSizeX || | 302 | npos.X > regionSizeX || |
301 | npos.Y > regionSizeY)) | 303 | npos.Y > regionSizeY)) |
302 | { | 304 | { |
303 | if (npos.X < 0.0) npos.X = 1.0f; | 305 | if (npos.X < 0.0) npos.X = 1.0f; |
304 | if (npos.Y < 0.0) npos.Y = 1.0f; | 306 | if (npos.Y < 0.0) npos.Y = 1.0f; |
305 | if (npos.Z < 0.0) npos.Z = 0.0f; | 307 | if (npos.Z < 0.0 && clampZ) npos.Z = 0.0f; |
306 | if (npos.X > regionSizeX) npos.X = regionSizeX - 1.0f; | 308 | if (npos.X > regionSizeX) npos.X = regionSizeX - 1.0f; |
307 | if (npos.Y > regionSizeY) npos.Y = regionSizeY - 1.0f; | 309 | if (npos.Y > regionSizeY) npos.Y = regionSizeY - 1.0f; |
308 | 310 | ||
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 5903274..0d2c8c3 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -4143,8 +4143,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
4143 | { | 4143 | { |
4144 | byebyeRegions.Add(handle); | 4144 | byebyeRegions.Add(handle); |
4145 | // this should not be here | 4145 | // this should not be here |
4146 | if(eventQueue != null) | 4146 | // if(eventQueue != null) |
4147 | eventQueue.DisableSimulator(handle,UUID); | 4147 | /// eventQueue.DisableSimulator(handle,UUID); |
4148 | } | 4148 | } |
4149 | } | 4149 | } |
4150 | else | 4150 | else |
@@ -4154,8 +4154,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
4154 | { | 4154 | { |
4155 | byebyeRegions.Add(handle); | 4155 | byebyeRegions.Add(handle); |
4156 | // this should not be here | 4156 | // this should not be here |
4157 | if(eventQueue != null) | 4157 | // if(eventQueue != null) |
4158 | eventQueue.DisableSimulator(handle,UUID); | 4158 | // eventQueue.DisableSimulator(handle,UUID); |
4159 | } | 4159 | } |
4160 | } | 4160 | } |
4161 | } | 4161 | } |