summaryrefslogtreecommitdiff
path: root/indra/newview/llworldmap.cpp
diff options
context:
space:
mode:
authorJosh Bell <josh@lindenlab.com>2007-11-01 22:02:35 +0000
committerJosh Bell <josh@lindenlab.com>2007-11-01 22:02:35 +0000
commit7afa8058aae0d5363cc19c7df1e6d2d7ec3bf7ac (patch)
tree52f41bda3e57a58e968421212a8a48eead6f653d /indra/newview/llworldmap.cpp
parent833e8d5c2a1dd48fd89b8b438dbe56572697bb76 (diff)
svn merge -r 72652:72881 svn+ssh://svn.lindenlab.com/svn/linden/branches/sl-search-11 --> release
QAR-11: pair-reviewed the merge w/ Sam.
Diffstat (limited to 'indra/newview/llworldmap.cpp')
-rw-r--r--indra/newview/llworldmap.cpp34
1 files changed, 32 insertions, 2 deletions
diff --git a/indra/newview/llworldmap.cpp b/indra/newview/llworldmap.cpp
index 16a8be7bc7..6ba10ea0a9 100644
--- a/indra/newview/llworldmap.cpp
+++ b/indra/newview/llworldmap.cpp
@@ -106,7 +106,11 @@ LLWorldMap::LLWorldMap() :
mNeighborMap(NULL),
mTelehubCoverageMap(NULL),
mNeighborMapWidth(0),
- mNeighborMapHeight(0)
+ mNeighborMapHeight(0),
+ mSLURLRegionName(),
+ mSLURL(),
+ mSLURLCallback(0),
+ mSLURLTeleport(false)
{
for (S32 map=0; map<MAP_SIM_IMAGE_TYPES; ++map)
{
@@ -398,6 +402,19 @@ void LLWorldMap::sendNamedRegionRequest(std::string region_name)
msg->addStringFast(_PREHASH_Name, region_name);
gAgent.sendReliableMessage();
}
+// public
+void LLWorldMap::sendNamedRegionRequest(std::string region_name,
+ url_callback_t callback,
+ const std::string& callback_url,
+ bool teleport) // immediately teleport when result returned
+{
+ mSLURLRegionName = region_name;
+ mSLURL = callback_url;
+ mSLURLCallback = callback;
+ mSLURLTeleport = teleport;
+
+ sendNamedRegionRequest(region_name);
+}
// public
void LLWorldMap::sendMapBlockRequest(U16 min_x, U16 min_y, U16 max_x, U16 max_y, bool return_nonexistent)
@@ -532,6 +549,8 @@ void LLWorldMap::processMapBlockReply(LLMessageSystem* msg, void**)
U32 x_meters = x_regions * REGION_WIDTH_UNITS;
U32 y_meters = y_regions * REGION_WIDTH_UNITS;
+ U64 handle = to_region_handle(x_meters, y_meters);
+
if (access == 255)
{
// This region doesn't exist
@@ -547,13 +566,23 @@ void LLWorldMap::processMapBlockReply(LLMessageSystem* msg, void**)
found_null_sim = true;
}
+ else if(gWorldMap->mSLURLCallback != NULL)
+ {
+ // Server returns definitive capitalization, SLURL might
+ // not have that.
+ if (!stricmp(gWorldMap->mSLURLRegionName.c_str(), name))
+ {
+ gWorldMap->mSLURLCallback(handle, gWorldMap->mSLURL, image_id, gWorldMap->mSLURLTeleport);
+ gWorldMap->mSLURLCallback = NULL;
+ gWorldMap->mSLURLRegionName.clear();
+ }
+ }
else
{
adjust = gWorldMap->extendAABB(x_meters,
y_meters,
x_meters+REGION_WIDTH_UNITS,
y_meters+REGION_WIDTH_UNITS) || adjust;
- U64 handle = to_region_handle(x_meters, y_meters);
// llinfos << "Map sim " << name << " image layer " << agent_flags << " ID " << image_id.getString() << llendl;
@@ -614,6 +643,7 @@ void LLWorldMap::processMapBlockReply(LLMessageSystem* msg, void**)
}
}
}
+
if(adjust) gFloaterWorldMap->adjustZoomSliderBounds();
gFloaterWorldMap->updateSims(found_null_sim);
}