diff options
author | Diva Canto | 2012-04-24 22:17:10 -0700 |
---|---|---|
committer | Diva Canto | 2012-04-24 22:17:10 -0700 |
commit | cf1c34605bf58ee783c2a7d0c63f51ecf6d3288a (patch) | |
tree | b04510fc672510514fd15808dc456b467bc64092 /OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |
parent | refactor: Combine ScenePresence.Teleport() and TeleportWithMomentum() (diff) | |
download | opensim-SC_OLD-cf1c34605bf58ee783c2a7d0c63f51ecf6d3288a.zip opensim-SC_OLD-cf1c34605bf58ee783c2a7d0c63f51ecf6d3288a.tar.gz opensim-SC_OLD-cf1c34605bf58ee783c2a7d0c63f51ecf6d3288a.tar.bz2 opensim-SC_OLD-cf1c34605bf58ee783c2a7d0c63f51ecf6d3288a.tar.xz |
HG: Moved User-level code down to the HGEntityTransferModule where it belongs.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 221e0bd..8d810fc 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -61,8 +61,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
61 | set { m_MaxTransferDistance = value; } | 61 | set { m_MaxTransferDistance = value; } |
62 | } | 62 | } |
63 | 63 | ||
64 | private int m_levelHGTeleport = 0; | ||
65 | |||
66 | protected bool m_Enabled = false; | 64 | protected bool m_Enabled = false; |
67 | protected Scene m_aScene; | 65 | protected Scene m_aScene; |
68 | protected List<Scene> m_Scenes = new List<Scene>(); | 66 | protected List<Scene> m_Scenes = new List<Scene>(); |
@@ -106,7 +104,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
106 | if (transferConfig != null) | 104 | if (transferConfig != null) |
107 | { | 105 | { |
108 | MaxTransferDistance = transferConfig.GetInt("max_distance", 4095); | 106 | MaxTransferDistance = transferConfig.GetInt("max_distance", 4095); |
109 | m_levelHGTeleport = transferConfig.GetInt("LevelHGTeleport", 0); | ||
110 | } | 107 | } |
111 | 108 | ||
112 | m_agentsInTransit = new List<UUID>(); | 109 | m_agentsInTransit = new List<UUID>(); |
@@ -240,16 +237,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
240 | 237 | ||
241 | destinationRegionName = finalDestination.RegionName; | 238 | destinationRegionName = finalDestination.RegionName; |
242 | 239 | ||
243 | // check if HyperGrid teleport is allowed, based on user level | ||
244 | int flags = m_aScene.GridService.GetRegionFlags(sp.Scene.RegionInfo.ScopeID, reg.RegionID); | ||
245 | |||
246 | if (((flags & (int)OpenSim.Data.RegionFlags.Hyperlink) != 0) && (sp.UserLevel < m_levelHGTeleport)) | ||
247 | { | ||
248 | m_log.WarnFormat("[ENTITY TRANSFER MODULE]: Final destination link is non permitted hypergrid region. Unable to teleport agent."); | ||
249 | sp.ControllingClient.SendTeleportFailed("HyperGrid teleport not permitted"); | ||
250 | return; | ||
251 | } | ||
252 | |||
253 | uint curX = 0, curY = 0; | 240 | uint curX = 0, curY = 0; |
254 | Utils.LongToUInts(sp.Scene.RegionInfo.RegionHandle, out curX, out curY); | 241 | Utils.LongToUInts(sp.Scene.RegionInfo.RegionHandle, out curX, out curY); |
255 | int curCellX = (int)(curX / Constants.RegionSize); | 242 | int curCellX = (int)(curX / Constants.RegionSize); |
@@ -413,7 +400,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
413 | bool logout = false; | 400 | bool logout = false; |
414 | if (!CreateAgent(sp, reg, finalDestination, agentCircuit, teleportFlags, out reason, out logout)) | 401 | if (!CreateAgent(sp, reg, finalDestination, agentCircuit, teleportFlags, out reason, out logout)) |
415 | { | 402 | { |
416 | sp.ControllingClient.SendTeleportFailed(String.Format("Destination refused: {0}", | 403 | sp.ControllingClient.SendTeleportFailed(String.Format("Teleport refused: {0}", |
417 | reason)); | 404 | reason)); |
418 | return; | 405 | return; |
419 | } | 406 | } |