From 133f3a41ebe62fdc55f40cad125e0264a942b6d8 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 17 Sep 2015 01:43:10 +0100 Subject: remove bad merge code.. --- .../CoreModules/World/WorldMap/MapSearchModule.cs | 30 ++++++++++++---------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs index e08bdc0..ab2e064 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs @@ -166,14 +166,26 @@ namespace OpenSim.Region.CoreModules.World.WorldMap // or url encode if possible. // the hacks we do with this viewer... // + bool needOriginalName = false; string mapNameOrig = mapName; if (mapName.Contains("|")) + { mapName = mapName.Replace('|', ':'); + needOriginalName = true; + } if (mapName.Contains("+")) + { mapName = mapName.Replace('+', ' '); + needOriginalName = true; + } if (mapName.Contains("!")) + { mapName = mapName.Replace('!', '/'); - + needOriginalName = true; + } + if (mapName.Contains(".")) + needOriginalName = true; + // try to fetch from GridServer List regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20); // if (regionInfos.Count == 0) @@ -195,7 +207,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap // ugh! V2-3 is very sensitive about the result being // exactly the same as the requested name - if (regionInfos.Count == 1 && (mapName != mapNameOrig)) + if (regionInfos.Count == 1 && needOriginalName) datas.ForEach(d => d.Name = mapNameOrig); blocks.AddRange(datas); @@ -206,22 +218,12 @@ namespace OpenSim.Region.CoreModules.World.WorldMap WorldMap.MapBlockFromGridRegion(block,info, flags); blocks.Add(block); } - // ugh! V2-3 is very sensitive about the result being - // exactly the same as the requested name - if (regionInfos.Count == 1 && mapNameOrig.Contains("|") || mapNameOrig.Contains("+")) - data.Name = mapNameOrig; - else - data.Name = info.RegionName; - data.RegionFlags = 0; // TODO not used? - data.WaterHeight = 0; // not used - data.X = (ushort)(info.RegionLocX / Constants.RegionSize); - data.Y = (ushort)(info.RegionLocY / Constants.RegionSize); - blocks.Add(data); } } // final block, closing the search result - AddFinalBlock(blocks); + if(blocks.Count == 0) + AddFinalBlock(blocks); // flags are agent flags sent from the viewer. // they have different values depending on different viewers, apparently -- cgit v1.1