- convert comments into documentation

- minor formatting adjustments
- remove some trailing whitespace
0.6.0-stable
Mike Mazur 2008-10-14 09:40:05 +00:00
parent 4da1901ed9
commit 3e124a3dba
1 changed files with 40 additions and 38 deletions

View File

@ -61,10 +61,8 @@ namespace OpenSim.Region.Environment.Scenes
public SynchronizeSceneHandler SynchronizeScene = null;
public int splitID = 0;
#region Fields
protected Timer m_restartWaitTimer = new Timer();
protected SimStatsReporter m_statsReporter;
@ -84,8 +82,6 @@ namespace OpenSim.Region.Environment.Scenes
private int m_timePhase = 24;
/// <summary>
/// Are we applying physics to any of the prims in this scene?
/// </summary>
@ -349,18 +345,21 @@ namespace OpenSim.Region.Environment.Scenes
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)
{
// 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)
{
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());
}
}
// 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 resultY = Math.Abs((int)otherRegion.RegionLocY - (int)RegionInfo.RegionLocY);
if (resultX <= 1 && resultY <= 1)
@ -428,7 +427,6 @@ namespace OpenSim.Region.Environment.Scenes
return true;
}
// Given float seconds, this will restart the region.
public void AddNeighborRegion(RegionInfo region)
{
lock (m_neighbours)
@ -457,6 +455,10 @@ namespace OpenSim.Region.Environment.Scenes
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)
{
// notifications are done in 15 second increments