Add size of region to OAR control file. Megaregions (sw root OARs when saved) will have a size larger than 256x256

Not yet read.  Do not rely on this information yet, it may change.
This commit is contained in:
Justin Clark-Casey (justincc)
2012-05-19 04:56:47 +01:00
parent 824a3a114b
commit 5759313f7f
3 changed files with 56 additions and 17 deletions

View File

@@ -113,10 +113,25 @@ namespace OpenSim.Region.RegionCombinerModule
}
}
public bool IsRootForMegaregion(UUID sceneId)
public bool IsRootForMegaregion(UUID regionId)
{
lock (m_regions)
return m_regions.ContainsKey(sceneId);
return m_regions.ContainsKey(regionId);
}
public Vector2 GetSizeOfMegaregion(UUID regionId)
{
lock (m_regions)
{
if (m_regions.ContainsKey(regionId))
{
RegionConnections rootConn = m_regions[regionId];
return new Vector2((float)rootConn.XEnd, (float)rootConn.YEnd);
}
}
throw new Exception(string.Format("Region with id {0} not found", regionId));
}
private void NewPresence(ScenePresence presence)