aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorUbitUmarov2017-06-26 00:18:46 +0100
committerUbitUmarov2017-06-26 00:18:46 +0100
commit041854234429800d6ca10c4987c5d99185552fd6 (patch)
tree7073a059733da39c9e4f5d85f59f3d5b8ae78bbc /OpenSim/Region/Framework/Scenes
parentchange Backup calls overlap control code (diff)
downloadopensim-SC_OLD-041854234429800d6ca10c4987c5d99185552fd6.zip
opensim-SC_OLD-041854234429800d6ca10c4987c5d99185552fd6.tar.gz
opensim-SC_OLD-041854234429800d6ca10c4987c5d99185552fd6.tar.bz2
opensim-SC_OLD-041854234429800d6ca10c4987c5d99185552fd6.tar.xz
some shortcuts on local osTeleport, reduce its time penalty, do it with script thread
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rwxr-xr-xOpenSim/Region/Framework/Scenes/Scene.cs44
1 files changed, 30 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 09b209e..5e8487d 100755
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -4824,16 +4824,34 @@ Label_GroupsDone:
4824 public void RequestTeleportLocation(IClientAPI remoteClient, string regionName, Vector3 position, 4824 public void RequestTeleportLocation(IClientAPI remoteClient, string regionName, Vector3 position,
4825 Vector3 lookat, uint teleportFlags) 4825 Vector3 lookat, uint teleportFlags)
4826 { 4826 {
4827 GridRegion region = GridService.GetRegionByName(RegionInfo.ScopeID, regionName); 4827 if (EntityTransferModule == null)
4828 {
4829 m_log.DebugFormat("[SCENE]: Unable to perform teleports: no AgentTransferModule is active");
4830 return;
4831 }
4832
4833 ScenePresence sp = GetScenePresence(remoteClient.AgentId);
4834 if (sp == null || sp.IsDeleted || sp.IsInTransit)
4835 return;
4828 4836
4829 if (region == null) 4837 ulong regionHandle = 0;
4838 if(regionName == RegionInfo.RegionName)
4839 regionHandle = RegionInfo.RegionHandle;
4840 else
4841 {
4842 GridRegion region = GridService.GetRegionByName(RegionInfo.ScopeID, regionName);
4843 if (region != null)
4844 regionHandle = region.RegionHandle;
4845 }
4846
4847 if(regionHandle == 0)
4830 { 4848 {
4831 // can't find the region: Tell viewer and abort 4849 // can't find the region: Tell viewer and abort
4832 remoteClient.SendTeleportFailed("The region '" + regionName + "' could not be found."); 4850 remoteClient.SendTeleportFailed("The region '" + regionName + "' could not be found.");
4833 return; 4851 return;
4834 } 4852 }
4835 4853
4836 RequestTeleportLocation(remoteClient, region.RegionHandle, position, lookat, teleportFlags); 4854 EntityTransferModule.Teleport(sp, regionHandle, position, lookat, teleportFlags);
4837 } 4855 }
4838 4856
4839 /// <summary> 4857 /// <summary>
@@ -4847,19 +4865,17 @@ Label_GroupsDone:
4847 public void RequestTeleportLocation(IClientAPI remoteClient, ulong regionHandle, Vector3 position, 4865 public void RequestTeleportLocation(IClientAPI remoteClient, ulong regionHandle, Vector3 position,
4848 Vector3 lookAt, uint teleportFlags) 4866 Vector3 lookAt, uint teleportFlags)
4849 { 4867 {
4850 ScenePresence sp = GetScenePresence(remoteClient.AgentId); 4868 if (EntityTransferModule == null)
4851 if (sp != null)
4852 { 4869 {
4853 if (EntityTransferModule != null) 4870 m_log.DebugFormat("[SCENE]: Unable to perform teleports: no AgentTransferModule is active");
4854 { 4871 return;
4855 EntityTransferModule.Teleport(sp, regionHandle, position, lookAt, teleportFlags);
4856 }
4857 else
4858 {
4859 m_log.DebugFormat("[SCENE]: Unable to perform teleports: no AgentTransferModule is active");
4860 sp.ControllingClient.SendTeleportFailed("Unable to perform teleports on this simulator.");
4861 }
4862 } 4872 }
4873
4874 ScenePresence sp = GetScenePresence(remoteClient.AgentId);
4875 if (sp == null || sp.IsDeleted || sp.IsInTransit)
4876 return;
4877
4878 EntityTransferModule.Teleport(sp, regionHandle, position, lookAt, teleportFlags);
4863 } 4879 }
4864 4880
4865 public bool CrossAgentToNewRegion(ScenePresence agent, bool isFlying) 4881 public bool CrossAgentToNewRegion(ScenePresence agent, bool isFlying)