eliminate redundant SP.m_regionInfo since it always has the scene.

We were already referencing through the scene in some places.
remove-scene-viewer
Justin Clark-Casey (justincc) 2011-09-12 23:00:15 +01:00
parent 62b2450529
commit dea0935361
1 changed files with 6 additions and 8 deletions

View File

@ -188,7 +188,6 @@ namespace OpenSim.Region.Framework.Scenes
private float m_health = 100f; private float m_health = 100f;
protected RegionInfo m_regionInfo;
protected ulong crossingFromRegion; protected ulong crossingFromRegion;
private readonly Vector3[] Dir_Vectors = new Vector3[9]; private readonly Vector3[] Dir_Vectors = new Vector3[9];
@ -725,7 +724,6 @@ namespace OpenSim.Region.Framework.Scenes
m_name = String.Format("{0} {1}", m_firstname, m_lastname); m_name = String.Format("{0} {1}", m_firstname, m_lastname);
m_scene = world; m_scene = world;
m_uuid = client.AgentId; m_uuid = client.AgentId;
m_regionInfo = world.RegionInfo;
m_localId = m_scene.AllocateLocalId(); m_localId = m_scene.AllocateLocalId();
UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, m_uuid); UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, m_uuid);
@ -1156,7 +1154,7 @@ namespace OpenSim.Region.Framework.Scenes
//m_log.DebugFormat("Completed movement"); //m_log.DebugFormat("Completed movement");
m_controllingClient.MoveAgentIntoRegion(m_regionInfo, AbsolutePosition, look); m_controllingClient.MoveAgentIntoRegion(m_scene.RegionInfo, AbsolutePosition, look);
SendInitialData(); SendInitialData();
// Create child agents in neighbouring regions // Create child agents in neighbouring regions
@ -2877,8 +2875,8 @@ namespace OpenSim.Region.Framework.Scenes
/// </returns> /// </returns>
protected int HaveNeighbor(Cardinals car, ref int[] fix) protected int HaveNeighbor(Cardinals car, ref int[] fix)
{ {
uint neighbourx = m_regionInfo.RegionLocX; uint neighbourx = m_scene.RegionInfo.RegionLocX;
uint neighboury = m_regionInfo.RegionLocY; uint neighboury = m_scene.RegionInfo.RegionLocY;
int dir = (int)car; int dir = (int)car;
@ -2898,8 +2896,8 @@ namespace OpenSim.Region.Framework.Scenes
if (neighbourRegion == null) if (neighbourRegion == null)
{ {
fix[0] = (int)(m_regionInfo.RegionLocX - neighbourx); fix[0] = (int)(m_scene.RegionInfo.RegionLocX - neighbourx);
fix[1] = (int)(m_regionInfo.RegionLocY - neighboury); fix[1] = (int)(m_scene.RegionInfo.RegionLocY - neighboury);
return dir * (-1); return dir * (-1);
} }
else else