diff options
author | Melanie | 2012-03-18 20:44:56 +0000 |
---|---|---|
committer | Melanie | 2012-03-18 20:44:56 +0000 |
commit | c7e302864a2eef7f9587ed22286c96a6074ac5b3 (patch) | |
tree | 8f0df2f66811309fd790966770434fa3ff68bfdf /OpenSim/Region/CoreModules/World/WorldMap | |
parent | Merge branch 'ubitwork' (diff) | |
parent | Amend to previous commit: normalize strings ToLower. (diff) | |
download | opensim-SC_OLD-c7e302864a2eef7f9587ed22286c96a6074ac5b3.zip opensim-SC_OLD-c7e302864a2eef7f9587ed22286c96a6074ac5b3.tar.gz opensim-SC_OLD-c7e302864a2eef7f9587ed22286c96a6074ac5b3.tar.bz2 opensim-SC_OLD-c7e302864a2eef7f9587ed22286c96a6074ac5b3.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
OpenSim/Region/Framework/Scenes/Scene.cs
Diffstat (limited to 'OpenSim/Region/CoreModules/World/WorldMap')
-rw-r--r-- | OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs index f9384e9..3efb7dd 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs | |||
@@ -92,7 +92,23 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
92 | return; | 92 | return; |
93 | } | 93 | } |
94 | 94 | ||
95 | //m_log.DebugFormat("MAP NAME=({0})", mapName); | 95 | //m_log.DebugFormat("MAP NAME=({0})", mapName); |
96 | |||
97 | // Hack to get around the fact that ll V3 now drops the port from the | ||
98 | // map name. See https://jira.secondlife.com/browse/VWR-28570 | ||
99 | // | ||
100 | // Caller, use this magic form instead: | ||
101 | // secondlife://http|!!mygrid.com|8002|Region+Name/128/128 | ||
102 | // or url encode if possible. | ||
103 | // the hacks we do with this viewer... | ||
104 | // | ||
105 | string mapNameOrig = mapName; | ||
106 | if (mapName.Contains("|")) | ||
107 | mapName = mapName.Replace('|', ':'); | ||
108 | if (mapName.Contains("+")) | ||
109 | mapName = mapName.Replace('+', ' '); | ||
110 | if (mapName.Contains("!")) | ||
111 | mapName = mapName.Replace('!', '/'); | ||
96 | 112 | ||
97 | // try to fetch from GridServer | 113 | // try to fetch from GridServer |
98 | List<GridRegion> regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20); | 114 | List<GridRegion> regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20); |
@@ -114,7 +130,12 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
114 | data.MapImageId = UUID.Zero; | 130 | data.MapImageId = UUID.Zero; |
115 | else | 131 | else |
116 | data.MapImageId = info.TerrainImage; | 132 | data.MapImageId = info.TerrainImage; |
117 | data.Name = info.RegionName; | 133 | // ugh! V2-3 is very sensitive about the result being |
134 | // exactly the same as the requested name | ||
135 | if (regionInfos.Count == 1) | ||
136 | data.Name = mapNameOrig; | ||
137 | else | ||
138 | data.Name = info.RegionName; | ||
118 | data.RegionFlags = 0; // TODO not used? | 139 | data.RegionFlags = 0; // TODO not used? |
119 | data.WaterHeight = 0; // not used | 140 | data.WaterHeight = 0; // not used |
120 | data.X = (ushort)(info.RegionLocX / Constants.RegionSize); | 141 | data.X = (ushort)(info.RegionLocX / Constants.RegionSize); |
@@ -138,6 +159,17 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
138 | // flags are agent flags sent from the viewer. | 159 | // flags are agent flags sent from the viewer. |
139 | // they have different values depending on different viewers, apparently | 160 | // they have different values depending on different viewers, apparently |
140 | remoteClient.SendMapBlock(blocks, flags); | 161 | remoteClient.SendMapBlock(blocks, flags); |
162 | |||
163 | // send extra user messages for V3 | ||
164 | // because the UI is very confusing | ||
165 | // while we don't fix the hard-coded urls | ||
166 | if (flags == 2) | ||
167 | { | ||
168 | if (regionInfos.Count == 0) | ||
169 | remoteClient.SendAgentAlertMessage("No regions found with that name.", true); | ||
170 | else if (regionInfos.Count == 1) | ||
171 | remoteClient.SendAgentAlertMessage("Region found!", false); | ||
172 | } | ||
141 | } | 173 | } |
142 | 174 | ||
143 | // private Scene GetClientScene(IClientAPI client) | 175 | // private Scene GetClientScene(IClientAPI client) |