Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion indra/newview/app_settings/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13879,7 +13879,7 @@
<key>Type</key>
<string>S32</string>
<key>Value</key>
<integer>1</integer>
<integer>0</integer>
</map>
<key>WaterGLFogDensityScale</key>
<map>
Expand Down
5 changes: 5 additions & 0 deletions indra/newview/lllandmarkactions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,11 @@ void LLLandmarkActions::copySLURLtoClipboard(const LLUUID& landmarkInventoryItem

void copy_slurl_to_clipboard_callback(const std::string& slurl)
{
if (slurl.empty())
{
LLNotificationsUtil::add("LandmarkLocationUnknown");
return;
}
gViewerWindow->getWindow()->copyTextToClipboard(utf8str_to_wstring(slurl));
LLSD args;
args["SLURL"] = slurl;
Expand Down
56 changes: 34 additions & 22 deletions indra/newview/llworldmapmessage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
#include "llagent.h"
#include "llfloaterworldmap.h"

const U32 LAYER_FLAG = 2;
constexpr U32 LAYER_FLAG = 2;
constexpr S32 MAP_SIM_RETURN_NULL_SIMS = 0x00010000;

//---------------------------------------------------------------------------
// World Map Message Handling
Expand Down Expand Up @@ -135,7 +136,11 @@ void LLWorldMapMessage::sendMapBlockRequest(U16 min_x, U16 min_y, U16 max_x, U16
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
U32 flags = LAYER_FLAG;
flags |= (return_nonexistent ? 0x10000 : 0);
if (return_nonexistent)
{
// overwrite LAYER_FLAG, otherwise server won't respond to missing regions
flags = MAP_SIM_RETURN_NULL_SIMS;
}
msg->addU32Fast(_PREHASH_Flags, flags);
msg->addU32Fast(_PREHASH_EstateID, 0); // Filled in on sim
msg->addBOOLFast(_PREHASH_Godlike, false); // Filled in on sim
Expand All @@ -157,15 +162,17 @@ void LLWorldMapMessage::processMapBlockReply(LLMessageSystem* msg, void**)
U32 agent_flags;
msg->getU32Fast(_PREHASH_AgentData, _PREHASH_Flags, agent_flags);

// There's only one flag that we ever use here
if (agent_flags != LAYER_FLAG)
S32 num_blocks = msg->getNumberOfBlocksFast(_PREHASH_Data);

// There's only one flag that we ever use here, unless we also want an existence check.
if (agent_flags != LAYER_FLAG
&& num_blocks != 1) // we check existence for a single region
{
LL_WARNS() << "Invalid map image type returned! layer = " << agent_flags << LL_ENDL;
return;
}

S32 num_blocks = msg->getNumberOfBlocksFast(_PREHASH_Data);
//LL_INFOS("WorldMap") << "num_blocks = " << num_blocks << LL_ENDL;
LL_DEBUGS("WorldMap") << "num_blocks = " << num_blocks << LL_ENDL;

bool found_null_sim = false;

Expand All @@ -191,26 +198,31 @@ void LLWorldMapMessage::processMapBlockReply(LLMessageSystem* msg, void**)
U32 x_world = (U32)(x_regions) * REGION_WIDTH_UNITS;
U32 y_world = (U32)(y_regions) * REGION_WIDTH_UNITS;

// name shouldn't be empty, see EXT-4568
llassert(!name.empty());

// Insert that region in the world map, if failure, flag it as a "null_sim"
if (!(LLWorldMap::getInstance()->insertRegion(x_world, y_world, name, image_id, (U32)accesscode, region_flags)))
// Name shouldn't be empty unless region doesn't exist
if (!name.empty())
{
found_null_sim = true;
}
// Insert that region in the world map, if failure, flag it as a "null_sim"
if (!(LLWorldMap::getInstance()->insertRegion(x_world, y_world, name, image_id, (U32)accesscode, region_flags)))
{
found_null_sim = true;
}

// If we hit a valid tracking location, do what needs to be done app level wise
if (LLWorldMap::getInstance()->isTrackingValidLocation())
{
LLVector3d pos_global = LLWorldMap::getInstance()->getTrackedPositionGlobal();
if (LLWorldMap::getInstance()->isTrackingDoubleClick())
// If we hit a valid tracking location, do what needs to be done app level wise
if (LLWorldMap::getInstance()->isTrackingValidLocation())
{
// Teleport if the user double clicked
gAgent.teleportViaLocation(pos_global);
LLVector3d pos_global = LLWorldMap::getInstance()->getTrackedPositionGlobal();
if (LLWorldMap::getInstance()->isTrackingDoubleClick())
{
// Teleport if the user double clicked
gAgent.teleportViaLocation(pos_global);
}
// Update the "real" tracker information
gFloaterWorldMap->trackLocation(pos_global);
}
// Update the "real" tracker information
gFloaterWorldMap->trackLocation(pos_global);
}
else
{
found_null_sim = true;
}

// Handle the SLURL callback if any
Expand Down
Loading