- convert comments into documentation
- minor formatting adjustments - remove some trailing whitespace0.6.0-stable
parent
4da1901ed9
commit
3e124a3dba
|
@ -61,10 +61,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
public SynchronizeSceneHandler SynchronizeScene = null;
|
public SynchronizeSceneHandler SynchronizeScene = null;
|
||||||
public int splitID = 0;
|
public int splitID = 0;
|
||||||
|
|
||||||
|
|
||||||
#region Fields
|
#region Fields
|
||||||
|
|
||||||
|
|
||||||
protected Timer m_restartWaitTimer = new Timer();
|
protected Timer m_restartWaitTimer = new Timer();
|
||||||
|
|
||||||
protected SimStatsReporter m_statsReporter;
|
protected SimStatsReporter m_statsReporter;
|
||||||
|
@ -84,8 +82,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
private int m_timePhase = 24;
|
private int m_timePhase = 24;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Are we applying physics to any of the prims in this scene?
|
/// Are we applying physics to any of the prims in this scene?
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -349,18 +345,21 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
return m_simulatorVersion;
|
return m_simulatorVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Another region is up. Gets called from Grid Comms:
|
||||||
|
/// (OGS1 -> LocalBackEnd -> RegionListened -> SceneCommunicationService)
|
||||||
|
/// We have to tell all our ScenePresences about it, and add it to the
|
||||||
|
/// neighbor list.
|
||||||
|
///
|
||||||
|
/// We only add it to the neighbor list if it's within 1 region from here.
|
||||||
|
/// Agents may have draw distance values that cross two regions though, so
|
||||||
|
/// we add it to the notify list regardless of distance. We'll check
|
||||||
|
/// the agent's draw distance before notifying them though.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="otherRegion">RegionInfo handle for the new region.</param>
|
||||||
|
/// <returns>True after all operations complete, throws exceptions otherwise.</returns>
|
||||||
public override bool OtherRegionUp(RegionInfo otherRegion)
|
public override bool OtherRegionUp(RegionInfo otherRegion)
|
||||||
{
|
{
|
||||||
// Another region is up.
|
|
||||||
// Gets called from Grid Comms (SceneCommunicationService<---RegionListener<----LocalBackEnd<----OGS1)
|
|
||||||
// We have to tell all our ScenePresences about it..
|
|
||||||
// and add it to the neighbor list.
|
|
||||||
|
|
||||||
// We only add it to the neighbor list if it's within 1 region from here.
|
|
||||||
// Agents may have draw distance values that cross two regions though, so
|
|
||||||
// we add it to the notify list regardless of distance.
|
|
||||||
// We'll check the agent's draw distance before notifying them though.
|
|
||||||
|
|
||||||
if (RegionInfo.RegionHandle != otherRegion.RegionHandle)
|
if (RegionInfo.RegionHandle != otherRegion.RegionHandle)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < m_neighbours.Count; i++)
|
for (int i = 0; i < m_neighbours.Count; i++)
|
||||||
|
@ -391,8 +390,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
//m_log.Info("[UP]: " + otherRegion.RegionHandle.ToString());
|
//m_log.Info("[UP]: " + otherRegion.RegionHandle.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If these are cast to INT because long + negative values + abs returns invalid data
|
|
||||||
|
|
||||||
|
// If these are cast to INT because long + negative values + abs returns invalid data
|
||||||
int resultX = Math.Abs((int)otherRegion.RegionLocX - (int)RegionInfo.RegionLocX);
|
int resultX = Math.Abs((int)otherRegion.RegionLocX - (int)RegionInfo.RegionLocX);
|
||||||
int resultY = Math.Abs((int)otherRegion.RegionLocY - (int)RegionInfo.RegionLocY);
|
int resultY = Math.Abs((int)otherRegion.RegionLocY - (int)RegionInfo.RegionLocY);
|
||||||
if (resultX <= 1 && resultY <= 1)
|
if (resultX <= 1 && resultY <= 1)
|
||||||
|
@ -428,7 +427,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Given float seconds, this will restart the region.
|
|
||||||
public void AddNeighborRegion(RegionInfo region)
|
public void AddNeighborRegion(RegionInfo region)
|
||||||
{
|
{
|
||||||
lock (m_neighbours)
|
lock (m_neighbours)
|
||||||
|
@ -457,6 +455,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Given float seconds, this will restart the region.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="seconds">float indicating duration before restart.</param>
|
||||||
public virtual void Restart(float seconds)
|
public virtual void Restart(float seconds)
|
||||||
{
|
{
|
||||||
// notifications are done in 15 second increments
|
// notifications are done in 15 second increments
|
||||||
|
|
Loading…
Reference in New Issue