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/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs | |
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 |
1 files changed, 36 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) |