diff options
tiny commit to prepare for the first proper part of Scene.cs refactoring.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index f2d0219..05a553c 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -71,6 +71,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
71 | private LLVector3 lastPhysPos = new LLVector3(); | 71 | private LLVector3 lastPhysPos = new LLVector3(); |
72 | private int m_wearablesSerial = 1; | 72 | private int m_wearablesSerial = 1; |
73 | 73 | ||
74 | private List<ulong> m_KnownChildRegions = new List<ulong>(); //neighbouring regions we have enabled a child agent in | ||
75 | |||
74 | private enum Dir_ControlFlags | 76 | private enum Dir_ControlFlags |
75 | { | 77 | { |
76 | DIR_CONTROL_FLAG_FOWARD = MainAvatar.ControlFlags.AGENT_CONTROL_AT_POS, | 78 | DIR_CONTROL_FLAG_FOWARD = MainAvatar.ControlFlags.AGENT_CONTROL_AT_POS, |
@@ -365,7 +367,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
365 | m_scene.SendAllSceneObjectsToClient(this); | 367 | m_scene.SendAllSceneObjectsToClient(this); |
366 | } | 368 | } |
367 | 369 | ||
368 | protected void MakeChildAgent() | 370 | public void MakeChildAgent() |
369 | { | 371 | { |
370 | Velocity = new LLVector3(0, 0, 0); | 372 | Velocity = new LLVector3(0, 0, 0); |
371 | m_isChildAgent = true; | 373 | m_isChildAgent = true; |
@@ -401,6 +403,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
401 | { | 403 | { |
402 | } | 404 | } |
403 | 405 | ||
406 | public void AddNeighbourRegion(ulong regionHandle) | ||
407 | { | ||
408 | if (!m_KnownChildRegions.Contains(regionHandle)) | ||
409 | { | ||
410 | m_KnownChildRegions.Add(regionHandle); | ||
411 | } | ||
412 | } | ||
413 | |||
404 | #endregion | 414 | #endregion |
405 | 415 | ||
406 | #region Event Handlers | 416 | #region Event Handlers |
@@ -818,7 +828,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
818 | AbsolutePosition, m_textureEntry.ToBytes(), m_parentID); | 828 | AbsolutePosition, m_textureEntry.ToBytes(), m_parentID); |
819 | if (!m_isChildAgent) | 829 | if (!m_isChildAgent) |
820 | { | 830 | { |
821 | m_scene.InformClientOfNeighbours(m_controllingClient); | 831 | m_scene.InformClientOfNeighbours(this); |
822 | m_newAvatar = false; | 832 | m_newAvatar = false; |
823 | } | 833 | } |
824 | 834 | ||
@@ -833,22 +843,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
833 | public void SendOurAppearance(IClientAPI client) | 843 | public void SendOurAppearance(IClientAPI client) |
834 | { | 844 | { |
835 | client.SendWearables(m_wearables, m_wearablesSerial++); | 845 | client.SendWearables(m_wearables, m_wearablesSerial++); |
836 | |||
837 | //this.SendFullUpdateToAllClients(); | ||
838 | //this.SendAppearanceToAllOtherAgents(); | ||
839 | |||
840 | m_scene.SendAllSceneObjectsToClient(this); | 846 | m_scene.SendAllSceneObjectsToClient(this); |
841 | m_controllingClient.SendViewerTime(m_scene.TimePhase); | 847 | m_controllingClient.SendViewerTime(m_scene.TimePhase); |
842 | |||
843 | //Please don't remove the following code (at least not yet), just leave it commented out | ||
844 | //gives the user god powers, should help with debuging things in the future | ||
845 | /* | ||
846 | GrantGodlikePowersPacket grant = new GrantGodlikePowersPacket(); | ||
847 | grant.AgentData.AgentID = this.ControllingClient.AgentId; | ||
848 | grant.AgentData.SessionID = this.ControllingClient.SessionId; | ||
849 | grant.GrantData.GodLevel = 255; | ||
850 | grant.GrantData.Token = LLUUID.Random(); | ||
851 | this.ControllingClient.OutPacket(grant);*/ | ||
852 | } | 848 | } |
853 | 849 | ||
854 | /// <summary> | 850 | /// <summary> |
@@ -975,7 +971,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
975 | 971 | ||
976 | LLVector3 vel = m_velocity; | 972 | LLVector3 vel = m_velocity; |
977 | ulong neighbourHandle = Helpers.UIntsToLong((uint) (neighbourx*256), (uint) (neighboury*256)); | 973 | ulong neighbourHandle = Helpers.UIntsToLong((uint) (neighbourx*256), (uint) (neighboury*256)); |
978 | RegionInfo neighbourRegion = m_scene.RequestNeighbouringRegionInfo(neighbourHandle); | 974 | SimpleRegionInfo neighbourRegion = m_scene.RequestNeighbouringRegionInfo(neighbourHandle); |
979 | if (neighbourRegion != null) | 975 | if (neighbourRegion != null) |
980 | { | 976 | { |
981 | bool res = | 977 | bool res = |