aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
authorDiva Canto2010-01-15 15:11:58 -0800
committerDiva Canto2010-01-15 15:11:58 -0800
commitf1c30784ac767bf5f62e81748984b76d85d71f6a (patch)
tree5aa635eadb534f30cd8aa2b9a1803f637e9b95a6 /OpenSim/Region/Framework/Scenes/Scene.cs
parentAdded a UserAccountCache to the UserAccountServiceConnectors. Uses a CenomeCa... (diff)
downloadopensim-SC_OLD-f1c30784ac767bf5f62e81748984b76d85d71f6a.zip
opensim-SC_OLD-f1c30784ac767bf5f62e81748984b76d85d71f6a.tar.gz
opensim-SC_OLD-f1c30784ac767bf5f62e81748984b76d85d71f6a.tar.bz2
opensim-SC_OLD-f1c30784ac767bf5f62e81748984b76d85d71f6a.tar.xz
* General cleanup of Teleports, Crossings and Child agents. They are now in the new AgentTransferModule, in line with what MW started implementing back in May -- ITeleportModule. This has been renamed IAgentTransferModule, to be more generic.
* HGSceneCommunicationService has been deleted * SceneCommunicationService will likely be deleted soon too
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs67
1 files changed, 17 insertions, 50 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 48f0331..dcbbe08 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -315,7 +315,7 @@ namespace OpenSim.Region.Framework.Scenes
315 protected IConfigSource m_config; 315 protected IConfigSource m_config;
316 protected IRegionSerialiserModule m_serialiser; 316 protected IRegionSerialiserModule m_serialiser;
317 protected IDialogModule m_dialogModule; 317 protected IDialogModule m_dialogModule;
318 protected ITeleportModule m_teleportModule; 318 protected IAgentTransferModule m_teleportModule;
319 319
320 protected ICapabilitiesModule m_capsModule; 320 protected ICapabilitiesModule m_capsModule;
321 public ICapabilitiesModule CapsModule 321 public ICapabilitiesModule CapsModule
@@ -901,7 +901,7 @@ namespace OpenSim.Region.Framework.Scenes
901 regInfo.RegionName = otherRegion.RegionName; 901 regInfo.RegionName = otherRegion.RegionName;
902 regInfo.ScopeID = otherRegion.ScopeID; 902 regInfo.ScopeID = otherRegion.ScopeID;
903 regInfo.ExternalHostName = otherRegion.ExternalHostName; 903 regInfo.ExternalHostName = otherRegion.ExternalHostName;
904 904 GridRegion r = new GridRegion(regInfo);
905 try 905 try
906 { 906 {
907 ForEachScenePresence(delegate(ScenePresence agent) 907 ForEachScenePresence(delegate(ScenePresence agent)
@@ -915,7 +915,8 @@ namespace OpenSim.Region.Framework.Scenes
915 List<ulong> old = new List<ulong>(); 915 List<ulong> old = new List<ulong>();
916 old.Add(otherRegion.RegionHandle); 916 old.Add(otherRegion.RegionHandle);
917 agent.DropOldNeighbours(old); 917 agent.DropOldNeighbours(old);
918 InformClientOfNeighbor(agent, regInfo); 918 if (m_teleportModule != null)
919 m_teleportModule.EnableChildAgent(agent, r);
919 } 920 }
920 } 921 }
921 ); 922 );
@@ -1063,6 +1064,7 @@ namespace OpenSim.Region.Framework.Scenes
1063 { 1064 {
1064 foreach (RegionInfo region in m_regionRestartNotifyList) 1065 foreach (RegionInfo region in m_regionRestartNotifyList)
1065 { 1066 {
1067 GridRegion r = new GridRegion(region);
1066 try 1068 try
1067 { 1069 {
1068 ForEachScenePresence(delegate(ScenePresence agent) 1070 ForEachScenePresence(delegate(ScenePresence agent)
@@ -1070,9 +1072,8 @@ namespace OpenSim.Region.Framework.Scenes
1070 // If agent is a root agent. 1072 // If agent is a root agent.
1071 if (!agent.IsChildAgent) 1073 if (!agent.IsChildAgent)
1072 { 1074 {
1073 //agent.ControllingClient.new 1075 if (m_teleportModule != null)
1074 //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo()); 1076 m_teleportModule.EnableChildAgent(agent, r);
1075 InformClientOfNeighbor(agent, region);
1076 } 1077 }
1077 } 1078 }
1078 ); 1079 );
@@ -1217,7 +1218,7 @@ namespace OpenSim.Region.Framework.Scenes
1217 m_serialiser = RequestModuleInterface<IRegionSerialiserModule>(); 1218 m_serialiser = RequestModuleInterface<IRegionSerialiserModule>();
1218 m_dialogModule = RequestModuleInterface<IDialogModule>(); 1219 m_dialogModule = RequestModuleInterface<IDialogModule>();
1219 m_capsModule = RequestModuleInterface<ICapabilitiesModule>(); 1220 m_capsModule = RequestModuleInterface<ICapabilitiesModule>();
1220 m_teleportModule = RequestModuleInterface<ITeleportModule>(); 1221 m_teleportModule = RequestModuleInterface<IAgentTransferModule>();
1221 } 1222 }
1222 1223
1223 #endregion 1224 #endregion
@@ -3783,17 +3784,6 @@ namespace OpenSim.Region.Framework.Scenes
3783 return false; 3784 return false;
3784 } 3785 }
3785 3786
3786 public virtual bool IncomingReleaseAgent(UUID id)
3787 {
3788 return m_sceneGridService.ReleaseAgent(id);
3789 }
3790
3791 public void SendReleaseAgent(UUID origin, UUID id, string uri)
3792 {
3793 //m_interregionCommsOut.SendReleaseAgent(regionHandle, id, uri);
3794 SimulationService.ReleaseAgent(origin, id, uri);
3795 }
3796
3797 /// <summary> 3787 /// <summary>
3798 /// Tell a single agent to disconnect from the region. 3788 /// Tell a single agent to disconnect from the region.
3799 /// </summary> 3789 /// </summary>
@@ -3838,30 +3828,6 @@ namespace OpenSim.Region.Framework.Scenes
3838 } 3828 }
3839 3829
3840 /// <summary> 3830 /// <summary>
3841 /// Tell neighboring regions about this agent
3842 /// When the regions respond with a true value,
3843 /// tell the agents about the region.
3844 ///
3845 /// We have to tell the regions about the agents first otherwise it'll deny them access
3846 ///
3847 /// </summary>
3848 /// <param name="presence"></param>
3849 public void InformClientOfNeighbours(ScenePresence presence)
3850 {
3851 m_sceneGridService.EnableNeighbourChildAgents(presence, m_neighbours);
3852 }
3853
3854 /// <summary>
3855 /// Tell a neighboring region about this agent
3856 /// </summary>
3857 /// <param name="presence"></param>
3858 /// <param name="region"></param>
3859 public void InformClientOfNeighbor(ScenePresence presence, RegionInfo region)
3860 {
3861 m_sceneGridService.EnableNeighbourChildAgents(presence, m_neighbours);
3862 }
3863
3864 /// <summary>
3865 /// Tries to teleport agent to other region. 3831 /// Tries to teleport agent to other region.
3866 /// </summary> 3832 /// </summary>
3867 /// <param name="remoteClient"></param> 3833 /// <param name="remoteClient"></param>
@@ -3936,16 +3902,12 @@ namespace OpenSim.Region.Framework.Scenes
3936 } 3902 }
3937 3903
3938 if (m_teleportModule != null) 3904 if (m_teleportModule != null)
3939 { 3905 m_teleportModule.Teleport(sp, regionHandle, position, lookAt, teleportFlags);
3940 m_teleportModule.RequestTeleportToLocation(sp, regionHandle,
3941 position, lookAt, teleportFlags);
3942 }
3943 else 3906 else
3944 { 3907 {
3945 m_sceneGridService.RequestTeleportToLocation(sp, regionHandle, 3908 m_log.DebugFormat("[SCENE]: Unable to perform teleports: no AgentTransferModule is active");
3946 position, lookAt, teleportFlags); 3909 sp.ControllingClient.SendTeleportFailed("Unable to perform teleports on this simulator.");
3947 } 3910 }
3948
3949 } 3911 }
3950 } 3912 }
3951 3913
@@ -3971,7 +3933,12 @@ namespace OpenSim.Region.Framework.Scenes
3971 3933
3972 public void CrossAgentToNewRegion(ScenePresence agent, bool isFlying) 3934 public void CrossAgentToNewRegion(ScenePresence agent, bool isFlying)
3973 { 3935 {
3974 m_sceneGridService.CrossAgentToNewRegion(this, agent, isFlying); 3936 if (m_teleportModule != null)
3937 m_teleportModule.Cross(agent, isFlying);
3938 else
3939 {
3940 m_log.DebugFormat("[SCENE]: Unable to cross agent to neighbouring region, because there is no AgentTransferModule");
3941 }
3975 } 3942 }
3976 3943
3977 public void SendOutChildAgentUpdates(AgentPosition cadu, ScenePresence presence) 3944 public void SendOutChildAgentUpdates(AgentPosition cadu, ScenePresence presence)