diff options
author | Homer Horwitz | 2008-10-04 18:08:35 +0000 |
---|---|---|
committer | Homer Horwitz | 2008-10-04 18:08:35 +0000 |
commit | 63d7a92fb4a1a513ae539d9bf42c67fc22abcf90 (patch) | |
tree | 443bc4f5eca452163b84d90bef95a7518e0b2b2a /OpenSim | |
parent | Cap proxy mesh scale minimum to 0.01 meter for X, Y, and Z terms. (diff) | |
download | opensim-SC_OLD-63d7a92fb4a1a513ae539d9bf42c67fc22abcf90.zip opensim-SC_OLD-63d7a92fb4a1a513ae539d9bf42c67fc22abcf90.tar.gz opensim-SC_OLD-63d7a92fb4a1a513ae539d9bf42c67fc22abcf90.tar.bz2 opensim-SC_OLD-63d7a92fb4a1a513ae539d9bf42c67fc22abcf90.tar.xz |
Added immediate TP failure message for TPs to regions that aren't there,
instead of the 130s timeout somewhere. Additionally, mark the map-tile as
offline. This partly fixes the TP problems of Mantis 2332; the rest is a viewer
problem (just relogin).
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs | 38 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs | 19 |
2 files changed, 55 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs index 9dbe225..bc62e07 100644 --- a/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs | |||
@@ -248,8 +248,42 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap | |||
248 | public virtual void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY, uint flag) | 248 | public virtual void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY, uint flag) |
249 | { | 249 | { |
250 | List<MapBlockData> mapBlocks; | 250 | List<MapBlockData> mapBlocks; |
251 | mapBlocks = m_scene.SceneGridService.RequestNeighbourMapBlocks(minX - 4, minY - 4, minX + 4, minY + 4); | 251 | if ((flag & 0x10000) != 0) // user clicked on the map a tile that isn't visible |
252 | remoteClient.SendMapBlock(mapBlocks, flag); | 252 | { |
253 | List<MapBlockData> response = new List<MapBlockData>(); | ||
254 | |||
255 | // this should return one mapblock at most. But make sure: Look whether the one we requested is in there | ||
256 | mapBlocks = m_scene.SceneGridService.RequestNeighbourMapBlocks(minX, minY, maxX, maxY); | ||
257 | if (mapBlocks != null) | ||
258 | { | ||
259 | foreach (MapBlockData block in mapBlocks) | ||
260 | { | ||
261 | if (block.X == minX && block.Y == minY) | ||
262 | { | ||
263 | // found it => add it to response | ||
264 | response.Add(block); | ||
265 | break; | ||
266 | } | ||
267 | } | ||
268 | } | ||
269 | |||
270 | if (response.Count == 0) | ||
271 | { | ||
272 | // response still empty => couldn't find the map-tile the user clicked on => tell the client | ||
273 | MapBlockData block = new MapBlockData(); | ||
274 | block.X = (ushort)minX; | ||
275 | block.Y = (ushort)minY; | ||
276 | block.Access = 254; // == not there | ||
277 | response.Add(block); | ||
278 | } | ||
279 | remoteClient.SendMapBlock(response, 0); | ||
280 | } | ||
281 | else | ||
282 | { | ||
283 | // normal mapblock request. Use the provided values | ||
284 | mapBlocks = m_scene.SceneGridService.RequestNeighbourMapBlocks(minX - 4, minY - 4, maxX + 4, maxY + 4); | ||
285 | remoteClient.SendMapBlock(mapBlocks, flag); | ||
286 | } | ||
253 | } | 287 | } |
254 | 288 | ||
255 | public Hashtable OnHTTPGetMapImage(Hashtable keysvals) | 289 | public Hashtable OnHTTPGetMapImage(Hashtable keysvals) |
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index 08793d9..b342cb6 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs | |||
@@ -736,6 +736,25 @@ namespace OpenSim.Region.Environment.Scenes | |||
736 | avatar.ControllingClient.SendTeleportFailed("Remote Region appears to be down"); | 736 | avatar.ControllingClient.SendTeleportFailed("Remote Region appears to be down"); |
737 | } | 737 | } |
738 | } | 738 | } |
739 | else | ||
740 | { | ||
741 | // TP to a place that doesn't exist (anymore) | ||
742 | // Inform the viewer about that | ||
743 | avatar.ControllingClient.SendTeleportFailed("The region you tried to teleport to doesn't exist anymore"); | ||
744 | |||
745 | // and set the map-tile to '(Offline)' | ||
746 | uint regX, regY; | ||
747 | Helpers.LongToUInts(regionHandle, out regX, out regY); | ||
748 | |||
749 | MapBlockData block = new MapBlockData(); | ||
750 | block.X = (ushort)(regX / Constants.RegionSize); | ||
751 | block.Y = (ushort)(regY / Constants.RegionSize); | ||
752 | block.Access = 254; // == not there | ||
753 | |||
754 | List<MapBlockData> blocks = new List<MapBlockData>(); | ||
755 | blocks.Add(block); | ||
756 | avatar.ControllingClient.SendMapBlock(blocks, 0); | ||
757 | } | ||
739 | } | 758 | } |
740 | } | 759 | } |
741 | 760 | ||