remove bad merge code..
parent
2f1eab2792
commit
133f3a41eb
|
@ -166,14 +166,26 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
// or url encode if possible.
|
// or url encode if possible.
|
||||||
// the hacks we do with this viewer...
|
// the hacks we do with this viewer...
|
||||||
//
|
//
|
||||||
|
bool needOriginalName = false;
|
||||||
string mapNameOrig = mapName;
|
string mapNameOrig = mapName;
|
||||||
if (mapName.Contains("|"))
|
if (mapName.Contains("|"))
|
||||||
|
{
|
||||||
mapName = mapName.Replace('|', ':');
|
mapName = mapName.Replace('|', ':');
|
||||||
|
needOriginalName = true;
|
||||||
|
}
|
||||||
if (mapName.Contains("+"))
|
if (mapName.Contains("+"))
|
||||||
|
{
|
||||||
mapName = mapName.Replace('+', ' ');
|
mapName = mapName.Replace('+', ' ');
|
||||||
|
needOriginalName = true;
|
||||||
|
}
|
||||||
if (mapName.Contains("!"))
|
if (mapName.Contains("!"))
|
||||||
|
{
|
||||||
mapName = mapName.Replace('!', '/');
|
mapName = mapName.Replace('!', '/');
|
||||||
|
needOriginalName = true;
|
||||||
|
}
|
||||||
|
if (mapName.Contains("."))
|
||||||
|
needOriginalName = true;
|
||||||
|
|
||||||
// try to fetch from GridServer
|
// try to fetch from GridServer
|
||||||
List<GridRegion> regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20);
|
List<GridRegion> regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20);
|
||||||
// if (regionInfos.Count == 0)
|
// if (regionInfos.Count == 0)
|
||||||
|
@ -195,7 +207,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
// ugh! V2-3 is very sensitive about the result being
|
// ugh! V2-3 is very sensitive about the result being
|
||||||
// exactly the same as the requested name
|
// exactly the same as the requested name
|
||||||
|
|
||||||
if (regionInfos.Count == 1 && (mapName != mapNameOrig))
|
if (regionInfos.Count == 1 && needOriginalName)
|
||||||
datas.ForEach(d => d.Name = mapNameOrig);
|
datas.ForEach(d => d.Name = mapNameOrig);
|
||||||
|
|
||||||
blocks.AddRange(datas);
|
blocks.AddRange(datas);
|
||||||
|
@ -206,22 +218,12 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
WorldMap.MapBlockFromGridRegion(block,info, flags);
|
WorldMap.MapBlockFromGridRegion(block,info, flags);
|
||||||
blocks.Add(block);
|
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
|
// final block, closing the search result
|
||||||
AddFinalBlock(blocks);
|
if(blocks.Count == 0)
|
||||||
|
AddFinalBlock(blocks);
|
||||||
|
|
||||||
// flags are agent flags sent from the viewer.
|
// flags are agent flags sent from the viewer.
|
||||||
// they have different values depending on different viewers, apparently
|
// they have different values depending on different viewers, apparently
|
||||||
|
|
Loading…
Reference in New Issue