diff --git a/indra/llmath/lloctree.h b/indra/llmath/lloctree.h index a663f8549..67a7c997e 100644 --- a/indra/llmath/lloctree.h +++ b/indra/llmath/lloctree.h @@ -537,7 +537,7 @@ public: OctreeStats::getInstance()->realloc(old_cap,mData.capacity()); #endif - this->notifyAddition(data); + LLOctreeNode::notifyAddition(data); return true; } else @@ -593,7 +593,7 @@ public: OctreeStats::getInstance()->realloc(old_cap,mData.capacity()); #endif - this->notifyAddition(data); + LLOctreeNode::notifyAddition(data); return true; } diff --git a/indra/newview/jcfloaterareasearch.cpp b/indra/newview/jcfloaterareasearch.cpp index 609b8f509..ae970ebc3 100644 --- a/indra/newview/jcfloaterareasearch.cpp +++ b/indra/newview/jcfloaterareasearch.cpp @@ -299,6 +299,7 @@ void JCFloaterAreaSearch::processObjectPropertiesFamily(LLMessageSystem* msg, vo // We cache unknown objects (to avoid having to request them later) // and requested objects. msg->getUUIDFast(_PREHASH_ObjectData, _PREHASH_OwnerID, data->owner_id); + if (auto obj = gObjectList.findObject(object_id)) obj->mOwnerID = data->owner_id; // Singu Note: Try to get Owner whenever possible msg->getUUIDFast(_PREHASH_ObjectData, _PREHASH_GroupID, data->group_id); msg->getStringFast(_PREHASH_ObjectData, _PREHASH_Name, data->name); msg->getStringFast(_PREHASH_ObjectData, _PREHASH_Description, data->desc); diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index a254f3899..19c5d6457 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -1149,6 +1149,7 @@ LLSpatialPartition* LLDrawable::getSpatialPartition() //must be an active volume if (!mSpatialBridge) { + // Spatial bridge ctors self-register... if (mVObjp->isHUDAttachment()) { setSpatialBridge(new LLHUDBridge(this, getRegion())); @@ -1615,9 +1616,9 @@ void LLSpatialBridge::cleanupReferences() } }*/ - LLDrawable* drawablep = mDrawable; - mDrawable = NULL; - drawablep->setSpatialBridge(NULL); + LLPointer drawablep = mDrawable; + mDrawable = nullptr; + drawablep->setSpatialBridge(nullptr); } } diff --git a/indra/newview/llfloateravatarlist.cpp b/indra/newview/llfloateravatarlist.cpp index bedba75e5..427997c02 100644 --- a/indra/newview/llfloateravatarlist.cpp +++ b/indra/newview/llfloateravatarlist.cpp @@ -363,45 +363,45 @@ static void cmd_teleport(const LLAvatarListEntry* entry); namespace { typedef LLMemberListener view_listener_t; - class RadarTrack : public view_listener_t + class RadarTrack final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLFloaterAvatarList::instance().onClickTrack(); return true; } }; - class RadarFocus : public view_listener_t + class RadarFocus final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLFloaterAvatarList::setFocusAvatar(LFIDBearer::getActiveSelectedID()); return true; } }; - class RadarFocusPrev : public view_listener_t + class RadarFocusPrev final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLFloaterAvatarList::instance().focusOnPrev(userdata.asInteger()); return true; } }; - class RadarFocusNext : public view_listener_t + class RadarFocusNext final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLFloaterAvatarList::instance().focusOnNext(userdata.asInteger()); return true; } }; - class RadarAnnounceKeys : public view_listener_t + class RadarAnnounceKeys final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLFloaterAvatarList::instance().sendKeys(); return true; diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp index af083f75f..226ab7769 100644 --- a/indra/newview/llimprocessing.cpp +++ b/indra/newview/llimprocessing.cpp @@ -514,22 +514,22 @@ bool group_vote_callback(const LLSD& notification, const LLSD& response) } static LLNotificationFunctorRegistration group_vote_callback_reg("GroupVote", group_vote_callback); -void LLIMProcessing::processNewMessage(LLUUID from_id, +void LLIMProcessing::processNewMessage(const LLUUID& from_id, BOOL from_group, - LLUUID to_id, + const LLUUID& to_id, U8 offline, EInstantMessage dialog, // U8 - LLUUID session_id, + const LLUUID& session_id, U32 timestamp, - std::string name, - std::string message, + std::string& name, + std::string& message, U32 parent_estate_id, - LLUUID region_id, + const LLUUID& region_id, LLVector3 position, U8 *binary_bucket, S32 binary_bucket_size, LLHost &sender, - LLUUID aux_id) + const LLUUID& aux_id) { LLChat chat; std::string buffer; @@ -566,6 +566,10 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, // object IMs contain sender object id in session_id (STORM-1209) || (chat.mSourceType == CHAT_SOURCE_OBJECT && LLMuteList::getInstance()->isMuted(session_id)); + // Singu Note: Try to get Owner whenever possible, here owner is the from id + if (chat.mSourceType == CHAT_SOURCE_OBJECT && session_id.notNull()) + if (auto obj = gObjectList.findObject(session_id)) obj->mOwnerID = from_id; + bool is_linden = chat.mSourceType != CHAT_SOURCE_OBJECT && LLMuteList::getInstance()->isLinden(name); chat.mMuted = is_muted && !is_linden; @@ -1967,6 +1971,8 @@ void LLIMProcessing::requestOfflineMessagesCoro(const LLCoroResponder& responder from_group = message_data["from_group"].asString() == "Y"; } + auto agentName = message_data["from_agent_name"].asString(); + auto message = message_data["message"].asString(); LLIMProcessing::processNewMessage(message_data["from_agent_id"].asUUID(), from_group, message_data["to_agent_id"].asUUID(), @@ -1974,8 +1980,8 @@ void LLIMProcessing::requestOfflineMessagesCoro(const LLCoroResponder& responder (EInstantMessage)message_data["dialog"].asInteger(), LLUUID::null, // session id, since there is none we can only use frienship/group invite caps message_data["timestamp"].asInteger(), - message_data["from_agent_name"].asString(), - message_data["message"].asString(), + agentName, + message, parent_estate_id, message_data["region_id"].asUUID(), position, diff --git a/indra/newview/llimprocessing.h b/indra/newview/llimprocessing.h index dfe9aa0e1..c8cc47f49 100644 --- a/indra/newview/llimprocessing.h +++ b/indra/newview/llimprocessing.h @@ -38,22 +38,22 @@ class LLIMProcessing { public: // Pre-process message for IM manager - static void processNewMessage(LLUUID from_id, + static void processNewMessage(const LLUUID& from_id, BOOL from_group, - LLUUID to_id, + const LLUUID& to_id, U8 offline, EInstantMessage dialog, // U8 - LLUUID session_id, + const LLUUID& session_id, U32 timestamp, - std::string agentName, - std::string message, + std::string& agentName, + std::string& message, U32 parent_estate_id, - LLUUID region_id, + const LLUUID& region_id, LLVector3 position, U8 *binary_bucket, S32 binary_bucket_size, LLHost &sender, - LLUUID aux_id = LLUUID::null); + const LLUUID& aux_id = LLUUID::null); // Either receives list of offline messages from 'ReadOfflineMsgs' capability // or uses legacy method diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index e40747eee..6c2644440 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -41,7 +41,11 @@ #include "lltabcontainer.h" #include "llviewercontrol.h" #include "llviewernetwork.h" +#include "llmutelist.h" +#endif +#include "llfloatermute.h" +#ifdef AI_UNUSED static const std::string PANEL_PICKS = "panel_picks"; #endif // AI_UNUSED @@ -55,19 +59,19 @@ std::string getProfileURL(const std::string& agent_name) llassert(!url.empty()); LLSD subs; subs["AGENT_NAME"] = agent_name; - url = LLWeb::expandURLSubstitutions(url,subs); + url = LLWeb::expandURLSubstitutions(url, subs); LLStringUtil::toLower(url); return url; } -class LLProfileHandler : public LLCommandHandler +class LLProfileHandler final : public LLCommandHandler { public: // requires trusted browser to trigger LLProfileHandler() : LLCommandHandler("profile", UNTRUSTED_THROTTLE) { } bool handle(const LLSD& params, const LLSD& query_map, - LLMediaCtrl* web) + LLMediaCtrl* web) override { if (params.size() < 1) return false; std::string agent_name = params[0]; @@ -80,14 +84,14 @@ public: }; LLProfileHandler gProfileHandler; -class LLAgentHandler : public LLCommandHandler +class LLAgentHandler final : public LLCommandHandler { public: // requires trusted browser to trigger LLAgentHandler() : LLCommandHandler("agent", UNTRUSTED_THROTTLE) { } bool handle(const LLSD& params, const LLSD& query_map, - LLMediaCtrl* web) + LLMediaCtrl* web) override { if (params.size() < 2) return false; LLUUID avatar_id; @@ -144,6 +148,12 @@ public: return true; } + if (verb == "removefriend") + { + LLAvatarActions::removeFriendDialog(avatar_id); + return true; + } + if (verb == "mute") { if (! LLAvatarActions::isBlocked(avatar_id)) @@ -162,6 +172,28 @@ public: return true; } + if (verb == "block") + { + if (params.size() > 2) + { + const std::string object_name = LLURI::unescape(params[2].asString()); + LLMute mute(avatar_id, object_name, LLMute::OBJECT); + LLMuteList::getInstance()->add(mute); + LLFloaterMute::showInstance()->selectMute(mute.mID); + } + return true; + } + + if (verb == "unblock") + { + if (params.size() > 2) + { + const std::string object_name = params[2].asString(); + LLMute mute(avatar_id, object_name, LLMute::OBJECT); + LLMuteList::getInstance()->remove(mute); + } + return true; + } return false; } }; @@ -171,13 +203,13 @@ LLAgentHandler gAgentHandler; #ifdef AI_UNUSED //-- LLPanelProfile::ChildStack begins ---------------------------------------- LLPanelProfile::ChildStack::ChildStack() -: mParent(NULL) +: mParent(nullptr) { } LLPanelProfile::ChildStack::~ChildStack() { - while (mStack.size() != 0) + while (!mStack.empty()) { view_list_t& top = mStack.back(); for (view_list_t::const_iterator it = top.begin(); it != top.end(); ++it) @@ -217,7 +249,7 @@ bool LLPanelProfile::ChildStack::push() /// Restore saved children (adding them back to the child list). bool LLPanelProfile::ChildStack::pop() { - if (mStack.size() == 0) + if (mStack.empty()) { LL_WARNS() << "Empty stack" << LL_ENDL; llassert(mStack.size() == 0); @@ -240,7 +272,7 @@ bool LLPanelProfile::ChildStack::pop() void LLPanelProfile::ChildStack::preParentReshape() { mSavedStack = mStack; - while(mStack.size() > 0) + while(!mStack.empty()) { pop(); } @@ -255,9 +287,8 @@ void LLPanelProfile::ChildStack::postParentReshape() for (stack_t::const_iterator stack_it = mStack.begin(); stack_it != mStack.end(); ++stack_it) { const view_list_t& vlist = (*stack_it); - for (view_list_t::const_iterator list_it = vlist.begin(); list_it != vlist.end(); ++list_it) + for (auto viewp : vlist) { - LLView* viewp = *list_it; LL_DEBUGS() << "removing " << viewp->getName() << LL_ENDL; mParent->removeChild(viewp); } @@ -273,9 +304,9 @@ void LLPanelProfile::ChildStack::dump() std::ostringstream dbg_line; dbg_line << "lvl #" << lvl << ":"; const view_list_t& vlist = (*stack_it); - for (view_list_t::const_iterator list_it = vlist.begin(); list_it != vlist.end(); ++list_it) + for (auto list_it : vlist) { - dbg_line << " " << (*list_it)->getName(); + dbg_line << " " << list_it->getName(); } LL_DEBUGS() << dbg_line.str() << LL_ENDL; } @@ -372,7 +403,7 @@ void LLPanelProfile::onOpen() void LLPanelProfile::onTabSelected(const LLSD& param) { std::string tab_name = param.asString(); - if (NULL != getTabContainer()[tab_name]) + if (nullptr != getTabContainer()[tab_name]) { getTabContainer()[tab_name]->onOpen(getAvatarId()); } @@ -416,7 +447,7 @@ void LLPanelProfile::closePanel(LLPanel* panel) // Prevent losing focus by the floater const child_list_t* child_list = getChildList(); - if (child_list->size() > 0) + if (!child_list->empty()) { child_list->front()->setFocus(TRUE); } diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index df8e183b1..371d4c68c 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -5446,6 +5446,7 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data node->mInventorySerial = inv_serial; node->mSitName.assign(sit_name); node->mTouchName.assign(touch_name); + if (auto obj = node->getObject()) obj->mOwnerID = owner_id; // Singu Note: Try to get Owner whenever possible } } diff --git a/indra/newview/llsurface.cpp b/indra/newview/llsurface.cpp index 0f10e1e13..560cf7653 100644 --- a/indra/newview/llsurface.cpp +++ b/indra/newview/llsurface.cpp @@ -71,7 +71,6 @@ LLSurface::LLSurface(U32 type, LLViewerRegion *regionp) : mGridsPerEdge(0), mOOGridsPerEdge(0.f), mPatchesPerEdge(0), - mNumberOfPatches(0), mType(type), mDetailTextureScale(0.f), mOriginGlobal(0.0, 0.0, 0.0), @@ -86,9 +85,6 @@ LLSurface::LLSurface(U32 type, LLViewerRegion *regionp) : mSurfaceZ = NULL; mNorm = NULL; - // Patch data - mPatchList = NULL; - // One of each for each camera mVisiblePatchCount = 0; @@ -119,7 +115,6 @@ LLSurface::~LLSurface() mGridsPerEdge = 0; mGridsPerPatchEdge = 0; mPatchesPerEdge = 0; - mNumberOfPatches = 0; destroyPatchData(); LLDrawPoolTerrain *poolp = (LLDrawPoolTerrain*) gPipeline.findPool(LLDrawPool::POOL_TERRAIN, mSTexturep); @@ -168,7 +163,6 @@ void LLSurface::create(const S32 grids_per_edge, mOOGridsPerEdge = 1.f / mGridsPerEdge; mGridsPerPatchEdge = grids_per_patch_edge; mPatchesPerEdge = grids_per_edge / mGridsPerPatchEdge; - mNumberOfPatches = mPatchesPerEdge * mPatchesPerEdge; mMetersPerGrid = width / (F32)grids_per_edge; mMetersPerEdge = mMetersPerGrid * grids_per_edge; // Aurora Sim @@ -310,14 +304,13 @@ void LLSurface::setOriginGlobal(const LLVector3d &origin_global) { LLVector3d new_origin_global; mOriginGlobal = origin_global; - LLSurfacePatch *patchp; S32 i, j; // Need to update the southwest corners of the patches for (j=0; jgetOriginGlobal(); @@ -369,353 +362,122 @@ void LLSurface::getNeighboringRegionsStatus( std::vector& regions ) } } -void LLSurface::connectNeighbor(LLSurface *neighborp, U32 direction) +void LLSurface::connectNeighbor(LLSurface* neighborp, U32 direction) { - S32 i; - LLSurfacePatch *patchp, *neighbor_patchp; -// Aurora Sim - S32 neighborPatchesPerEdge = neighborp->mPatchesPerEdge; -// Aurora Sim + // Constraints: + // - Regions width must equal height + // - Region width divisible by mGridsPerPatchEdge (16) + // - Region can only neighbor one other per side and coner (8 total, N, S, E, W, NW, NE, SW, SE) + // - Non-power-of-2 regions should work here, but the rest of the viewer code will probably choke on them. + surface_patch_ref patchp, neighbor_patchp; mNeighbors[direction] = neighborp; - neighborp->mNeighbors[gDirOpposite[direction]] = this; -// Aurora Sim - S32 ppe[2]; - S32 own_offset[2] = {0, 0}; - S32 neighbor_offset[2] = {0, 0}; - U32 own_xpos, own_ypos, neighbor_xpos, neighbor_ypos; - - ppe[0] = (mPatchesPerEdge < neighborPatchesPerEdge) ? mPatchesPerEdge : neighborPatchesPerEdge; // used for x - ppe[1] = ppe[0]; // used for y - - from_region_handle(mRegionp->getHandle(), &own_xpos, &own_ypos); - from_region_handle(neighborp->getRegion()->getHandle(), &neighbor_xpos, &neighbor_ypos); - - if(own_ypos >= neighbor_ypos) - { - neighbor_offset[1] = (own_ypos - neighbor_ypos) / mGridsPerPatchEdge; - ppe[1] = llmin(mPatchesPerEdge, neighborPatchesPerEdge-neighbor_offset[1]); - } - else - { - own_offset[1] = (neighbor_ypos - own_ypos) / mGridsPerPatchEdge; - ppe[1] = llmin(mPatchesPerEdge-own_offset[1], neighborPatchesPerEdge); - } - - if(own_xpos >= neighbor_xpos) - { - neighbor_offset[0] = (own_xpos - neighbor_xpos) / mGridsPerPatchEdge; - ppe[0] = llmin(mPatchesPerEdge, neighborPatchesPerEdge-neighbor_offset[0]); - } - else - { - own_offset[0] = (neighbor_xpos - own_xpos) / mGridsPerPatchEdge; - ppe[0] = llmin(mPatchesPerEdge-own_offset[0], neighborPatchesPerEdge); - } -// Aurora Sim + const S32 max_idx = mPatchesPerEdge - 1; + const S32 neighbor_max_idx = neighborp->mPatchesPerEdge - 1; // Connect patches - if (NORTHEAST == direction) + if (direction >= 4) { - patchp = getPatch(mPatchesPerEdge - 1, mPatchesPerEdge - 1); -// Aurora Sim - //neighbor_patchp = neighborp->getPatch(0, 0); - neighbor_patchp = neighborp->getPatch(neighbor_offset[0], neighbor_offset[1]); -// Aurora Sim - - patchp->connectNeighbor(neighbor_patchp, direction); - neighbor_patchp->connectNeighbor(patchp, gDirOpposite[direction]); - - patchp->updateNorthEdge(); // Only update one of north or east. - patchp->dirtyZ(); - } - else if (NORTHWEST == direction) + // Corner stitch + S32 patches[4][2] = { + {max_idx, max_idx}, //NORTHEAST + {0, max_idx}, //NORTHWEST + {0, 0}, //SOUTHWEST + {max_idx, 0}, //SOUTHEAST + }; + const S32* p = patches[direction - 4]; + surface_patch_ref patchp = getPatch(p[0], p[1]); + patchp->connectNeighbor(neighborp->getPatch(max_idx - p[0], max_idx - p[1]), direction); + if (NORTHEAST == direction) + { + patchp->updateNorthEdge(); // Only update one of north or east. + if (patchp->dirtyZ()) + { + dirtySurfacePatch(patchp); + } + } +} + else { -// Aurora Sim - S32 off = mPatchesPerEdge + neighbor_offset[1] - own_offset[1]; -// Aurora Sim - patchp = getPatch(0, mPatchesPerEdge - 1); -// Aurora Sim - //neighbor_patchp = neighborp->getPatch(mPatchesPerEdge - 1, 0); - neighbor_patchp = neighborp->getPatch(neighbor_offset[0] - 1, off); //neighborPatchesPerEdge - 1 - if (!neighbor_patchp) + // Edge stitch + // Aurora complicates this logic. + U32 pos[2][2] = { {0,0},{0,0} }; + from_region_handle(mRegionp->getHandle(), &pos[0][0], &pos[0][1]); + from_region_handle(neighborp->getRegion()->getHandle(), &pos[1][0], &pos[1][1]); + S32 width[2] = { (S32)mRegionp->getWidth(), (S32)neighborp->getRegion()->getWidth() }; + U32 mins[2] = { llmax(pos[0][0], pos[1][0]), llmax(pos[0][1], pos[1][1]) }; + U32 maxs[2] = { llmin(pos[0][0] + width[0], pos[1][0] + width[1]), llmin(pos[0][1] + width[0], pos[1][1] + width[1]) }; + S32 start[2][2] = { + {S32((mins[0] - pos[0][0]) / mGridsPerPatchEdge) - 1, S32((mins[1] - pos[0][1]) / mGridsPerPatchEdge) - 1}, + {S32((mins[0] - pos[1][0]) / neighborp->mGridsPerPatchEdge) - 1,S32((mins[1] - pos[1][1]) / neighborp->mGridsPerPatchEdge) - 1} + }; + + S32 end[2] = { llmin(S32((maxs[0] - pos[0][0]) / mGridsPerPatchEdge), max_idx), llmin(S32((maxs[1] - pos[0][1]) / mGridsPerPatchEdge), max_idx) }; + const U32& neighbor_direction = gDirOpposite[direction]; + S32 stride[4][4][2] = { + {{0, 1}, {max_idx, 0}, {neighbor_max_idx, 0}, {NORTHEAST, SOUTHEAST}}, //EAST + {{1, 0}, {0, max_idx}, {0, neighbor_max_idx}, {NORTHEAST, NORTHWEST} }, //NORTH + {{0, 1}, {0, 0}, {0, 0}, {NORTHWEST, SOUTHWEST}}, //WEST + {{1, 0}, {0, 0}, {0, 0}, {SOUTHEAST, SOUTHWEST}} //SOUTH + }; + const S32 offs[2][2] = { + {stride[direction][0][0], stride[direction][0][1]}, + {stride[neighbor_direction][0][0], stride[neighbor_direction][0][1]} + }; + + S32 x[2], y[2]; + x[0] = stride[direction][1][0] + offs[0][0] * start[0][0]; + y[0] = stride[direction][1][1] + offs[0][1] * start[0][1]; + x[1] = stride[neighbor_direction][2][0] + offs[1][0] * start[1][0]; + y[1] = stride[neighbor_direction][2][1] + offs[1][1] * start[1][1]; + + for ( + x[0] = stride[direction][1][0] + offs[0][0] * start[0][0], + y[0] = stride[direction][1][1] + offs[0][1] * start[0][1], + x[1] = stride[neighbor_direction][2][0] + offs[1][0] * start[1][0], + y[1] = stride[neighbor_direction][2][1] + offs[1][1] * start[1][1]; + (!offs[0][0] || x[0] <= end[0]) && (!offs[0][1] || (y[0] <= end[1])); + x[0] += offs[0][0], y[0] += offs[0][1], + x[1] += offs[1][0], y[1] += offs[1][1]) { - mNeighbors[direction] = NULL; - return; - } -// Aurora Sim - - patchp->connectNeighbor(neighbor_patchp, direction); - neighbor_patchp->connectNeighbor(patchp, gDirOpposite[direction]); - } - else if (SOUTHWEST == direction) - { - patchp = getPatch(0, 0); -// Aurora Sim - //neighbor_patchp = neighborp->getPatch(mPatchesPerEdge - 1, mPatchesPerEdge - 1); - neighbor_patchp = neighborp->getPatch(neighbor_offset[0] - 1, neighbor_offset[1] - 1); - if (!neighbor_patchp) - { - mNeighbors[direction] = NULL; - return; - } -// Aurora Sim - - patchp->connectNeighbor(neighbor_patchp, direction); - neighbor_patchp->connectNeighbor(patchp, gDirOpposite[direction]); - -// Aurora Sim - //neighbor_patchp->updateNorthEdge(); // Only update one of north or east. - neighbor_patchp->updateEastEdge(); // Only update one of north or east. -// Aurora Sim - neighbor_patchp->dirtyZ(); - } - else if (SOUTHEAST == direction) - { -// Aurora Sim - S32 off = mPatchesPerEdge + neighbor_offset[0] - own_offset[0]; -// Aurora Sim - - patchp = getPatch(mPatchesPerEdge - 1, 0); -// Aurora Sim - //neighbor_patchp = neighborp->getPatch(0, mPatchesPerEdge - 1); - neighbor_patchp = neighborp->getPatch(off, neighbor_offset[1] - 1); //0 - if (!neighbor_patchp) - { - mNeighbors[direction] = NULL; - return; - } -// Aurora Sim - - patchp->connectNeighbor(neighbor_patchp, direction); - neighbor_patchp->connectNeighbor(patchp, gDirOpposite[direction]); - } - else if (EAST == direction) - { - // Do east/west connections, first -// Aurora Sim - //for (i = 0; i < (S32)mPatchesPerEdge; i++) - for (i = 0; i < ppe[1]; i++) -// Aurora Sim - { -// Aurora Sim - //patchp = getPatch(mPatchesPerEdge - 1, i); - //neighbor_patchp = neighborp->getPatch(0, i); - patchp = getPatch(mPatchesPerEdge - 1, i + own_offset[1]); - neighbor_patchp = neighborp->getPatch(0, i + neighbor_offset[1]); -// Aurora Sim - - patchp->connectNeighbor(neighbor_patchp, direction); - neighbor_patchp->connectNeighbor(patchp, gDirOpposite[direction]); - - patchp->updateEastEdge(); - patchp->dirtyZ(); - } - - // Now do northeast/southwest connections -// Aurora Sim - //for (i = 0; i < (S32)mPatchesPerEdge - 1; i++) - for (i = 0; i < ppe[1] - 1; i++) -// Aurora Sim - { -// Aurora Sim - //patchp = getPatch(mPatchesPerEdge - 1, i); - //neighbor_patchp = neighborp->getPatch(0, i+1); - patchp = getPatch(mPatchesPerEdge - 1, i + own_offset[1]); - neighbor_patchp = neighborp->getPatch(0, i+1 + neighbor_offset[1]); -// Aurora Sim - - patchp->connectNeighbor(neighbor_patchp, NORTHEAST); - neighbor_patchp->connectNeighbor(patchp, SOUTHWEST); - } - // Now do southeast/northwest connections -// Aurora Sim - //for (i = 1; i < (S32)mPatchesPerEdge; i++) - for (i = 1; i < ppe[1]; i++) -// Aurora Sim - { -// Aurora Sim - //patchp = getPatch(mPatchesPerEdge - 1, i); - //neighbor_patchp = neighborp->getPatch(0, i-1); - patchp = getPatch(mPatchesPerEdge - 1, i + own_offset[1]); - neighbor_patchp = neighborp->getPatch(0, i-1 + neighbor_offset[1]); -// Aurora Sim - - patchp->connectNeighbor(neighbor_patchp, SOUTHEAST); - neighbor_patchp->connectNeighbor(patchp, NORTHWEST); + if (x[0] < 0 || y[0] < 0) { + continue; + } + surface_patch_ref patchp = getPatch(x[0], y[0]); + // diagonal stitch 1 + if ((offs[1][0] > 0 && x[1] > 0) || (offs[1][1] > 0 && y[1] > 0)) + { + patchp->connectNeighbor(neighborp->getPatch(x[1] - offs[1][0], y[1] - offs[1][1]), stride[direction][3][1]); + } + // edge stitch + if (x[1] >= 0 && y[1] >= 0 && x[1] <= neighbor_max_idx && y[1] <= neighbor_max_idx) + { + patchp->connectNeighbor(neighborp->getPatch(x[1], y[1]), direction); + } + // diagonal stitch 2 + if (x[1] + offs[1][0] <= neighbor_max_idx && y[1] + offs[1][1] <= neighbor_max_idx) + { + patchp->connectNeighbor(neighborp->getPatch(x[1] + offs[1][0], y[1] + offs[1][1]), stride[direction][3][0]); + } + if (direction == EAST) + { + patchp->updateEastEdge(); + if (patchp->dirtyZ()) + { + dirtySurfacePatch(patchp); + } + } + else if (direction == NORTH) + { + patchp->updateNorthEdge(); + if (patchp->dirtyZ()) + { + dirtySurfacePatch(patchp); + } + } } } - else if (NORTH == direction) - { - // Do north/south connections, first -// Aurora Sim - //for (i = 0; i < (S32)mPatchesPerEdge; i++) - for (i = 0; i < ppe[0]; i++) -// Aurora Sim - { -// Aurora Sim - //patchp = getPatch(i, mPatchesPerEdge - 1); - //neighbor_patchp = neighborp->getPatch(i, 0); - patchp = getPatch(i + own_offset[0], mPatchesPerEdge - 1); - neighbor_patchp = neighborp->getPatch(i + neighbor_offset[0], 0); -// Aurora Sim - - patchp->connectNeighbor(neighbor_patchp, direction); - neighbor_patchp->connectNeighbor(patchp, gDirOpposite[direction]); - - patchp->updateNorthEdge(); - patchp->dirtyZ(); - } - - // Do northeast/southwest connections -// Aurora Sim - //for (i = 0; i < (S32)mPatchesPerEdge - 1; i++) - for (i = 0; i < ppe[0] - 1; i++) -// Aurora Sim - { -// Aurora Sim - //patchp = getPatch(i, mPatchesPerEdge - 1); - //neighbor_patchp = neighborp->getPatch(i+1, 0); - patchp = getPatch(i + own_offset[0], mPatchesPerEdge - 1); - neighbor_patchp = neighborp->getPatch(i+1 + neighbor_offset[0], 0); -// Aurora Sim - - patchp->connectNeighbor(neighbor_patchp, NORTHEAST); - neighbor_patchp->connectNeighbor(patchp, SOUTHWEST); - } - // Do southeast/northwest connections -// Aurora Sim - //for (i = 1; i < (S32)mPatchesPerEdge; i++) - for (i = 1; i < ppe[0]; i++) -// Aurora Sim - { -// Aurora Sim - //patchp = getPatch(i, mPatchesPerEdge - 1); - //neighbor_patchp = neighborp->getPatch(i-1, 0); - patchp = getPatch(i + own_offset[0], mPatchesPerEdge - 1); - neighbor_patchp = neighborp->getPatch(i-1 + neighbor_offset[0], 0); -// Aurora Sim - - patchp->connectNeighbor(neighbor_patchp, NORTHWEST); - neighbor_patchp->connectNeighbor(patchp, SOUTHEAST); - } - } - else if (WEST == direction) - { - // Do east/west connections, first -// Aurora Sim - //for (i = 0; i < mPatchesPerEdge; i++) - for (i = 0; i < ppe[1]; i++) -// Aurora Sim - { -// Aurora Sim - //patchp = getPatch(0, i); - //neighbor_patchp = neighborp->getPatch(mPatchesPerEdge - 1, i); - patchp = getPatch(0, i + own_offset[1]); - neighbor_patchp = neighborp->getPatch(neighborPatchesPerEdge - 1, i + neighbor_offset[1]); - if (!neighbor_patchp) continue; -// Aurora Sim - - patchp->connectNeighbor(neighbor_patchp, direction); - neighbor_patchp->connectNeighbor(patchp, gDirOpposite[direction]); - - neighbor_patchp->updateEastEdge(); - neighbor_patchp->dirtyZ(); - } - - // Now do northeast/southwest connections -// Aurora Sim - //for (i = 1; i < mPatchesPerEdge; i++) - for (i = 1; i < ppe[1]; i++) -// Aurora Sim - { -// Aurora Sim - //patchp = getPatch(0, i); - //neighbor_patchp = neighborp->getPatch(mPatchesPerEdge - 1, i - 1); - patchp = getPatch(0, i + own_offset[1]); - neighbor_patchp = neighborp->getPatch(neighborPatchesPerEdge - 1, i - 1 + neighbor_offset[1]); - if (!neighbor_patchp) continue; -// Aurora Sim - - patchp->connectNeighbor(neighbor_patchp, SOUTHWEST); - neighbor_patchp->connectNeighbor(patchp, NORTHEAST); - } - - // Now do northwest/southeast connections -// Aurora Sim - //for (i = 0; i < mPatchesPerEdge - 1; i++) - for (i = 0; i < ppe[1] - 1; i++) -// Aurora Sim - { -// Aurora Sim - //patchp = getPatch(0, i); - //neighbor_patchp = neighborp->getPatch(mPatchesPerEdge - 1, i + 1); - patchp = getPatch(0, i + own_offset[1]); - neighbor_patchp = neighborp->getPatch(neighborPatchesPerEdge - 1, i + 1 + neighbor_offset[1]); - if (!neighbor_patchp) continue; -// Aurora Sim - - patchp->connectNeighbor(neighbor_patchp, NORTHWEST); - neighbor_patchp->connectNeighbor(patchp, SOUTHEAST); - } - } - else if (SOUTH == direction) - { - // Do north/south connections, first -// Aurora Sim - //for (i = 0; i < mPatchesPerEdge; i++) - for (i = 0; i < ppe[0]; i++) -// Aurora Sim - { -// Aurora Sim - //patchp = getPatch(i, 0); - //neighbor_patchp = neighborp->getPatch(i, mPatchesPerEdge - 1); - patchp = getPatch(i + own_offset[0], 0); - neighbor_patchp = neighborp->getPatch(i + neighbor_offset[0], neighborPatchesPerEdge - 1); - if (!neighbor_patchp) continue; -// Aurora Sim - - patchp->connectNeighbor(neighbor_patchp, direction); - neighbor_patchp->connectNeighbor(patchp, gDirOpposite[direction]); - - neighbor_patchp->updateNorthEdge(); - neighbor_patchp->dirtyZ(); - } - - // Now do northeast/southwest connections -// Aurora Sim - //for (i = 1; i < mPatchesPerEdge; i++) - for (i = 1; i < ppe[0]; i++) -// Aurora Sim - { -// Aurora Sim - //patchp = getPatch(i, 0); - //neighbor_patchp = neighborp->getPatch(i - 1, mPatchesPerEdge - 1); - patchp = getPatch(i + own_offset[0], 0); - neighbor_patchp = neighborp->getPatch(i - 1 + neighbor_offset[0], neighborPatchesPerEdge - 1); -// Aurora Sim - - patchp->connectNeighbor(neighbor_patchp, SOUTHWEST); - neighbor_patchp->connectNeighbor(patchp, NORTHEAST); - } - // Now do northeast/southwest connections -// Aurora Sim - //for (i = 0; i < mPatchesPerEdge - 1; i++) - for (i = 0; i < ppe[0] - 1; i++) -// Aurora Sim - { -// Aurora Sim - //patchp = getPatch(i, 0); - //neighbor_patchp = neighborp->getPatch(i + 1, mPatchesPerEdge - 1); - patchp = getPatch(i + own_offset[0], 0); - neighbor_patchp = neighborp->getPatch(i + 1 + neighbor_offset[0], neighborPatchesPerEdge - 1); -// Aurora Sim - - patchp->connectNeighbor(neighbor_patchp, SOUTHEAST); - neighbor_patchp->connectNeighbor(patchp, NORTHWEST); - } - } } void LLSurface::disconnectNeighbor(LLSurface *surfacep) @@ -730,10 +492,9 @@ void LLSurface::disconnectNeighbor(LLSurface *surfacep) } // Iterate through surface patches, removing any connectivity to removed surface. - if (mPatchList) // Don't crash if removed before - for (i = 0; i < mNumberOfPatches; i++) + for (auto& patchp : mPatchList) { - (mPatchList + i)->disconnectNeighbor(surfacep); + patchp->disconnectNeighbor(surfacep); } } @@ -802,13 +563,9 @@ void LLSurface::updatePatchVisibilities(LLAgent &agent) LLVector3 pos_region = mRegionp->getPosRegionFromGlobal(gAgentCamera.getCameraPositionGlobal()); - LLSurfacePatch *patchp; - mVisiblePatchCount = 0; - for (S32 i=0; iupdateVisibility(); if (patchp->getVisible()) { @@ -832,19 +589,29 @@ BOOL LLSurface::idleUpdate(F32 max_update_time) // If the Z height data has changed, we need to rebuild our // property line vertex arrays. - if (mDirtyPatchList.size() > 0) + if (!mDirtyPatchList.empty()) { getRegion()->dirtyHeights(); } // Always call updateNormals() / updateVerticalStats() // every frame to avoid artifacts - for(std::set::iterator iter = mDirtyPatchList.begin(); - iter != mDirtyPatchList.end(); ) + for (auto& it = mDirtyPatchList.cbegin(); it != mDirtyPatchList.cend();) { - std::set::iterator curiter = iter++; - LLSurfacePatch *patchp = *curiter; - patchp->updateNormals(); + if (it->second.expired()) + { + LL_WARNS() << "Expired dirty patch detected. Side " << it->first << LL_ENDL; + } + surface_patch_ref patchp = it->second.lock(); + if (!patchp) + { + it = mDirtyPatchList.erase(it); + continue; + } + if (patchp->updateNormals()) + { + patchp->getSurface()->dirtySurfacePatch(patchp); + } patchp->updateVerticalStats(); if (max_update_time == 0.f || update_timer.getElapsedTimeF32() < max_update_time) { @@ -852,9 +619,11 @@ BOOL LLSurface::idleUpdate(F32 max_update_time) { did_update = TRUE; patchp->clearDirty(); - mDirtyPatchList.erase(curiter); + it = mDirtyPatchList.erase(it); + continue; } } + ++it; } return did_update; } @@ -865,7 +634,6 @@ void LLSurface::decompressDCTPatch(LLBitPack &bitpack, LLGroupHeader *gopp, BOOL LLPatchHeader ph; S32 j, i; S32 patch[LARGE_PATCH_SIZE*LARGE_PATCH_SIZE]; - LLSurfacePatch *patchp; init_patch_decompressor(gopp->patch_size); gopp->stride = mGridsPerEdge; @@ -912,8 +680,7 @@ void LLSurface::decompressDCTPatch(LLBitPack &bitpack, LLGroupHeader *gopp, BOOL return; } - patchp = &mPatchList[j*mPatchesPerEdge + i]; - + const surface_patch_ref& patchp = mPatchList[j * mPatchesPerEdge + i]; decode_patch(bitpack, patch); decompress_patch(patchp->getDataZ(), patch, &ph); @@ -921,22 +688,26 @@ void LLSurface::decompressDCTPatch(LLBitPack &bitpack, LLGroupHeader *gopp, BOOL // Update edges for neighbors. Need to guarantee that this gets done before we generate vertical stats. patchp->updateNorthEdge(); patchp->updateEastEdge(); - if (patchp->getNeighborPatch(WEST)) + LLSurfacePatch* neighborPatch; + if (neighborPatch = patchp->getNeighborPatch(WEST)) { - patchp->getNeighborPatch(WEST)->updateEastEdge(); + neighborPatch->updateEastEdge(); } - if (patchp->getNeighborPatch(SOUTHWEST)) + if (neighborPatch = patchp->getNeighborPatch(SOUTHWEST)) { - patchp->getNeighborPatch(SOUTHWEST)->updateEastEdge(); - patchp->getNeighborPatch(SOUTHWEST)->updateNorthEdge(); + neighborPatch->updateEastEdge(); + neighborPatch->updateNorthEdge(); } - if (patchp->getNeighborPatch(SOUTH)) + if (neighborPatch = patchp->getNeighborPatch(SOUTH)) { - patchp->getNeighborPatch(SOUTH)->updateNorthEdge(); + neighborPatch->updateNorthEdge(); } // Dirty patch statistics, and flag that the patch has data. - patchp->dirtyZ(); + if (patchp->dirtyZ()) + { + dirtySurfacePatch(patchp); + } patchp->setHasReceivedData(); } } @@ -1089,8 +860,13 @@ LLVector3 LLSurface::resolveNormalGlobal(const LLVector3d& pos_global) const } -LLSurfacePatch *LLSurface::resolvePatchRegion(const F32 x, const F32 y) const +const surface_patch_ref& LLSurface::resolvePatchRegion(const F32 x, const F32 y) const { + if (mPatchList.empty()) { + LL_WARNS() << "No patches for current region!" << LL_ENDL; + static surface_patch_ref empty; + return empty; + } // x and y should be region-local coordinates. // If x and y are outside of the surface, then the returned // index will be for the nearest boundary patch. @@ -1141,29 +917,24 @@ LLSurfacePatch *LLSurface::resolvePatchRegion(const F32 x, const F32 y) const // *NOTE: Super paranoia code follows. S32 index = i + j * mPatchesPerEdge; - if((index < 0) || (index >= mNumberOfPatches)) + if((index < 0) || (index >= mPatchList.size())) { - if(0 == mNumberOfPatches) - { - LL_WARNS() << "No patches for current region!" << LL_ENDL; - return NULL; - } S32 old_index = index; - index = llclamp(old_index, 0, (mNumberOfPatches - 1)); + index = llclamp(old_index, 0, ((S32)mPatchList.size() - 1)); LL_WARNS() << "Clamping out of range patch index " << old_index << " to " << index << LL_ENDL; } - return &(mPatchList[index]); + return mPatchList[index]; } -LLSurfacePatch *LLSurface::resolvePatchRegion(const LLVector3 &pos_region) const +const surface_patch_ref& LLSurface::resolvePatchRegion(const LLVector3 &pos_region) const { return resolvePatchRegion(pos_region.mV[VX], pos_region.mV[VY]); } -LLSurfacePatch *LLSurface::resolvePatchGlobal(const LLVector3d &pos_global) const +const surface_patch_ref& LLSurface::resolvePatchGlobal(const LLVector3d &pos_global) const { llassert(mRegionp); LLVector3 pos_region = mRegionp->getPosRegionFromGlobal(pos_global); @@ -1192,37 +963,28 @@ void LLSurface::createPatchData() // Assumes mGridsPerEdge, mGridsPerPatchEdge, and mPatchesPerEdge have been properly set // TODO -- check for create() called when surface is not empty S32 i, j; - LLSurfacePatch *patchp; // Allocate memory - mPatchList = new LLSurfacePatch[mNumberOfPatches]; - - // One of each for each camera - mVisiblePatchCount = mNumberOfPatches; - - for (j=0; jsetSurface(this); - } + mPatchList[i] = std::make_shared(this, i); } + // One of each for each camera + mVisiblePatchCount = mPatchList.size(); + for (j=0; jmHasReceivedData = FALSE; - patchp->mSTexUpdate = TRUE; + const auto& patchp = getPatch(i, j); S32 data_offset = i * mGridsPerPatchEdge + j * mGridsPerPatchEdge * mGridsPerEdge; patchp->setDataZ(mSurfaceZ + data_offset); patchp->setDataNorm(mNorm + data_offset); - // We make each patch point to its neighbors so we can do resolution checking // when butting up different resolutions. Patches that don't have neighbors // somewhere will point to NULL on that side. @@ -1311,9 +1073,7 @@ void LLSurface::createPatchData() void LLSurface::destroyPatchData() { // Delete all of the cached patch data for these patches. - - delete [] mPatchList; - mPatchList = NULL; + mPatchList.clear(); mVisiblePatchCount = 0; } @@ -1336,36 +1096,50 @@ U32 LLSurface::getRenderStride(const U32 render_level) const } -LLSurfacePatch *LLSurface::getPatch(const S32 x, const S32 y) const +const surface_patch_ref& LLSurface::getPatch(const S32 x, const S32 y) const { + static surface_patch_ref empty(nullptr); if ((x < 0) || (x >= mPatchesPerEdge)) { LL_WARNS() << "Asking for patch out of bounds" << LL_ENDL; - return NULL; + return empty; } if ((y < 0) || (y >= mPatchesPerEdge)) { LL_WARNS() << "Asking for patch out of bounds" << LL_ENDL; - return NULL; + return empty; } - return mPatchList + x + y*mPatchesPerEdge; + return mPatchList[x + y*mPatchesPerEdge]; } void LLSurface::dirtyAllPatches() { - S32 i; - for (i = 0; i < mNumberOfPatches; i++) + for (auto& patchp : mPatchList) { - mPatchList[i].dirtyZ(); + if (patchp->dirtyZ()) + { + dirtySurfacePatch(patchp); + } } } -void LLSurface::dirtySurfacePatch(LLSurfacePatch *patchp) +void LLSurface::dirtySurfacePatch(const surface_patch_ref& patchp) { + if (!patchp) + { + return; + } + // Put surface patch on dirty surface patch list - mDirtyPatchList.insert(patchp); + if (std::find_if(mDirtyPatchList.begin(), mDirtyPatchList.end(), + [&patchp](std::pair >& entry) -> bool { + return entry.second.lock().get() == patchp.get(); + }) == mDirtyPatchList.end()) + { + mDirtyPatchList.push_back(std::make_pair(patchp->getSide(), patchp)); + } } diff --git a/indra/newview/llsurface.h b/indra/newview/llsurface.h index aedac01a3..16d96c467 100644 --- a/indra/newview/llsurface.h +++ b/indra/newview/llsurface.h @@ -60,9 +60,12 @@ static const S32 ONE_LESS_THAN_NEIGHBOR = -1; const S32 ABOVE_WATERLINE_ALPHA = 32; // The alpha of water when the land elevation is above the waterline. class LLViewerRegion; -class LLSurfacePatch; class LLBitPack; class LLGroupHeader; +class LLSurfacePatch; + +typedef std::shared_ptr surface_patch_ref; +typedef std::weak_ptr surface_patch_weak_ref; class LLSurface { @@ -111,9 +114,9 @@ public: F32 resolveHeightGlobal(const LLVector3d &position_global) const; LLVector3 resolveNormalGlobal(const LLVector3d& v) const; // Returns normal to surface - LLSurfacePatch *resolvePatchRegion(const F32 x, const F32 y) const; - LLSurfacePatch *resolvePatchRegion(const LLVector3 &position_region) const; - LLSurfacePatch *resolvePatchGlobal(const LLVector3d &position_global) const; + const surface_patch_ref& resolvePatchRegion(const F32 x, const F32 y) const; + const surface_patch_ref& resolvePatchRegion(const LLVector3 &position_region) const; + const surface_patch_ref& resolvePatchGlobal(const LLVector3d &position_global) const; // Update methods (called during idle, normally) BOOL idleUpdate(F32 max_update_time); @@ -136,7 +139,7 @@ public: void dirtyAllPatches(); // Use this to dirty all patches when changing terrain parameters - void dirtySurfacePatch(LLSurfacePatch *patchp); + void dirtySurfacePatch(const surface_patch_ref& patchp); LLVOWater *getWaterObj() { return mWaterObjp; } static void setTextureSize(const S32 texture_size); @@ -155,8 +158,6 @@ public: F32 mOOGridsPerEdge; // Inverse of grids per edge S32 mPatchesPerEdge; // Number of patches on one side of a region - S32 mNumberOfPatches; // Total number of patches - // Each surface points at 8 neighbors (or NULL) // +---+---+---+ @@ -191,11 +192,11 @@ protected: //F32 updateTexture(LLSurfacePatch *ppatch); - LLSurfacePatch *getPatch(const S32 x, const S32 y) const; + const surface_patch_ref& getPatch(const S32 x, const S32 y) const; protected: LLVector3d mOriginGlobal; // In absolute frame - LLSurfacePatch *mPatchList; // Array of all patches + std::vector< surface_patch_ref > mPatchList; // Array of all patches // Array of grid data, mGridsPerEdge * mGridsPerEdge F32 *mSurfaceZ; @@ -203,7 +204,7 @@ protected: // Array of grid normals, mGridsPerEdge * mGridsPerEdge LLVector3 *mNorm; - std::set mDirtyPatchList; + std::vector< std::pair > mDirtyPatchList; // The textures should never be directly initialized - use the setter methods! diff --git a/indra/newview/llsurfacepatch.cpp b/indra/newview/llsurfacepatch.cpp index 9112aa9fd..c999fff22 100644 --- a/indra/newview/llsurfacepatch.cpp +++ b/indra/newview/llsurfacepatch.cpp @@ -47,9 +47,9 @@ extern bool gShiftFrame; extern U64MicrosecondsImplicit gFrameTime; extern LLPipeline gPipeline; -LLSurfacePatch::LLSurfacePatch() +LLSurfacePatch::LLSurfacePatch(LLSurface* surface, U32 side) : mHasReceivedData(FALSE), - mSTexUpdate(FALSE), + mSTexUpdate(TRUE), mDirty(FALSE), mDirtyZStats(TRUE), mHeightsGenerated(FALSE), @@ -70,17 +70,12 @@ LLSurfacePatch::LLSurfacePatch() // set to non-zero values by higher classes. mConnectedEdge(NO_EDGE), mLastUpdateTime(0), - mSurfacep(NULL) -{ - S32 i; - for (i = 0; i < 8; i++) - { - setNeighborPatch(i, NULL); - } - for (i = 0; i < 9; i++) - { - mNormalsInvalid[i] = TRUE; - } + mSurfacep(NULL), + mNeighborPatches{ 0,0,0,0,0,0,0,0 }, + mNormalsInvalid{ 1,1,1,1,1,1,1,1,1 }, + mSide(side) +{ + setSurface(surface); } @@ -90,7 +85,7 @@ LLSurfacePatch::~LLSurfacePatch() } -void LLSurfacePatch::dirty() +bool LLSurfacePatch::dirty() { // These are outside of the loop in case we're still waiting for a dirty from the // texture being updated... @@ -109,8 +104,9 @@ void LLSurfacePatch::dirty() if (!mDirty) { mDirty = TRUE; - mSurfacep->dirtySurfacePatch(this); + return true; } + return false; } @@ -133,45 +129,31 @@ void LLSurfacePatch::disconnectNeighbor(LLSurface *surfacep) U32 i; for (i = 0; i < 8; i++) { - if (getNeighborPatch(i)) + const auto& patch = getNeighborPatch(i); + if (patch) { - if (getNeighborPatch(i)->mSurfacep == surfacep) + if (patch->mSurfacep == surfacep) { + if (EAST == i) + { + mConnectedEdge &= EAST_EDGE; + } + else if (NORTH == i) + { + mConnectedEdge &= NORTH_EDGE; + } + else if (WEST == i) + { + mConnectedEdge &= WEST_EDGE; + } + else if (SOUTH == i) + { + mConnectedEdge &= SOUTH_EDGE; + } setNeighborPatch(i, NULL); - mNormalsInvalid[i] = TRUE; } } } - - // Clean up connected edges - if (getNeighborPatch(EAST)) - { - if (getNeighborPatch(EAST)->mSurfacep == surfacep) - { - mConnectedEdge &= ~EAST_EDGE; - } - } - if (getNeighborPatch(NORTH)) - { - if (getNeighborPatch(NORTH)->mSurfacep == surfacep) - { - mConnectedEdge &= ~NORTH_EDGE; - } - } - if (getNeighborPatch(WEST)) - { - if (getNeighborPatch(WEST)->mSurfacep == surfacep) - { - mConnectedEdge &= ~WEST_EDGE; - } - } - if (getNeighborPatch(SOUTH)) - { - if (getNeighborPatch(SOUTH)->mSurfacep == surfacep) - { - mConnectedEdge &= ~SOUTH_EDGE; - } - } } LLVector3 LLSurfacePatch::getPointAgent(const U32 x, const U32 y) const @@ -283,64 +265,65 @@ void LLSurfacePatch::calcNormal(const U32 x, const U32 y, const U32 stride) { for (j = 0; j < 2; j++) { + LLSurfacePatch* patch; if (poffsets[i][j][0] < 0) { - if (!ppatches[i][j]->getNeighborPatch(WEST)) + if (patch = ppatches[i][j]->getNeighborPatch(WEST)) { - poffsets[i][j][0] = 0; + // Aurora Sim + ppatches[i][j] = patch; + poffsets[i][j][0] += patch_width; + poffsets[i][j][2] = patch->getSurface()->getGridsPerEdge(); +// Aurora Sim } else { -// Aurora Sim - ppatches[i][j] = ppatches[i][j]->getNeighborPatch(WEST); - poffsets[i][j][0] += patch_width; - poffsets[i][j][2] = ppatches[i][j]->getSurface()->getGridsPerEdge(); -// Aurora Sim + poffsets[i][j][0] = 0; } } if (poffsets[i][j][1] < 0) { - if (!ppatches[i][j]->getNeighborPatch(SOUTH)) + if (patch = ppatches[i][j]->getNeighborPatch(SOUTH)) { - poffsets[i][j][1] = 0; +// Aurora Sim + ppatches[i][j] = patch; + poffsets[i][j][1] += patch_width; + poffsets[i][j][2] = patch->getSurface()->getGridsPerEdge(); +// CR> Aurora Sim } else { -// Aurora Sim - ppatches[i][j] = ppatches[i][j]->getNeighborPatch(SOUTH); - poffsets[i][j][1] += patch_width; - poffsets[i][j][2] = ppatches[i][j]->getSurface()->getGridsPerEdge(); -// CR> Aurora Sim + poffsets[i][j][1] = 0; } } if (poffsets[i][j][0] >= (S32)patch_width) { - if (!ppatches[i][j]->getNeighborPatch(EAST)) + if (patch = ppatches[i][j]->getNeighborPatch(EAST)) { - poffsets[i][j][0] = patch_width - 1; +// Aurora Sim + ppatches[i][j] = patch; + poffsets[i][j][0] -= patch_width; + poffsets[i][j][2] = patch->getSurface()->getGridsPerEdge(); +// Aurora Sim } else { -// Aurora Sim - ppatches[i][j] = ppatches[i][j]->getNeighborPatch(EAST); - poffsets[i][j][0] -= patch_width; - poffsets[i][j][2] = ppatches[i][j]->getSurface()->getGridsPerEdge(); -// Aurora Sim + poffsets[i][j][0] = patch_width - 1; } } if (poffsets[i][j][1] >= (S32)patch_width) { - if (!ppatches[i][j]->getNeighborPatch(NORTH)) + if (patch = ppatches[i][j]->getNeighborPatch(NORTH)) { - poffsets[i][j][1] = patch_width - 1; +// Aurora Sim + ppatches[i][j] = patch; + poffsets[i][j][1] -= patch_width; + poffsets[i][j][2] = patch->getSurface()->getGridsPerEdge(); +// Aurora Sim } else { -// Aurora Sim - ppatches[i][j] = ppatches[i][j]->getNeighborPatch(NORTH); - poffsets[i][j][1] -= patch_width; - poffsets[i][j][2] = ppatches[i][j]->getSurface()->getGridsPerEdge(); -// Aurora Sim + poffsets[i][j][1] = patch_width - 1; } } } @@ -474,11 +457,11 @@ void LLSurfacePatch::updateVerticalStats() } -void LLSurfacePatch::updateNormals() +bool LLSurfacePatch::updateNormals() { if (mSurfacep->mType == 'w') { - return; + return false; } U32 grids_per_patch_edge = mSurfacep->getGridsPerPatchEdge(); U32 grids_per_edge = mSurfacep->getGridsPerEdge(); @@ -515,10 +498,12 @@ void LLSurfacePatch::updateNormals() // update the west edge if (mNormalsInvalid[NORTHWEST] || mNormalsInvalid[WEST] || mNormalsInvalid[SOUTHWEST]) { + LLSurfacePatch* northwest_patchp = getNeighborPatch(NORTHWEST); + LLSurfacePatch* north_patchp = getNeighborPatch(NORTH); // Aurora Sim - if (!getNeighborPatch(NORTH) && getNeighborPatch(NORTHWEST) && getNeighborPatch(NORTHWEST)->getHasReceivedData()) + if (!north_patchp && northwest_patchp && northwest_patchp->getHasReceivedData()) { - *(mDataZ + grids_per_patch_edge*grids_per_edge) = *(getNeighborPatch(NORTHWEST)->mDataZ + grids_per_patch_edge); + *(mDataZ + grids_per_patch_edge*grids_per_edge) = *(northwest_patchp->mDataZ + grids_per_patch_edge); } // Aurora Sim @@ -533,10 +518,12 @@ void LLSurfacePatch::updateNormals() // update the south edge if (mNormalsInvalid[SOUTHWEST] || mNormalsInvalid[SOUTH] || mNormalsInvalid[SOUTHEAST]) { + LLSurfacePatch* southeast_patchp = getNeighborPatch(SOUTHEAST); + LLSurfacePatch* east_patchp = getNeighborPatch(EAST); // Aurora Sim - if (!getNeighborPatch(EAST) && getNeighborPatch(SOUTHEAST) && getNeighborPatch(SOUTHEAST)->getHasReceivedData()) + if (!east_patchp && southeast_patchp && southeast_patchp->getHasReceivedData()) { - *(mDataZ + grids_per_patch_edge) = *(getNeighborPatch(SOUTHEAST)->mDataZ + grids_per_patch_edge * getNeighborPatch(SOUTHEAST)->getSurface()->getGridsPerEdge()); + *(mDataZ + grids_per_patch_edge) = *(southeast_patchp->mDataZ + grids_per_patch_edge * southeast_patchp->getSurface()->getGridsPerEdge()); } // Aurora Sim @@ -552,11 +539,14 @@ void LLSurfacePatch::updateNormals() // we'll want to do different things. if (mNormalsInvalid[NORTHEAST]) { - if (!getNeighborPatch(NORTHEAST)) + LLSurfacePatch* northeast_patchp = getNeighborPatch(NORTHEAST); + LLSurfacePatch* north_patchp = getNeighborPatch(NORTH); + LLSurfacePatch* east_patchp = getNeighborPatch(EAST); + if (!northeast_patchp) { - if (!getNeighborPatch(NORTH)) + if (!north_patchp) { - if (!getNeighborPatch(EAST)) + if (!east_patchp) { // No north or east neighbors. Pull from the diagonal in your own patch. *(mDataZ + grids_per_patch_edge + grids_per_patch_edge*grids_per_edge) = @@ -564,13 +554,13 @@ void LLSurfacePatch::updateNormals() } else { - if (getNeighborPatch(EAST)->getHasReceivedData()) + if (east_patchp->getHasReceivedData()) { // East, but not north. Pull from your east neighbor's northwest point. *(mDataZ + grids_per_patch_edge + grids_per_patch_edge*grids_per_edge) = // Aurora Sim //*(getNeighborPatch(EAST)->mDataZ + (grids_per_patch_edge - 1)*grids_per_edge); - *(getNeighborPatch(EAST)->mDataZ + (getNeighborPatch(EAST)->getSurface()->getGridsPerPatchEdge() - 1)*getNeighborPatch(EAST)->getSurface()->getGridsPerEdge()); + *(east_patchp->mDataZ + (east_patchp->getSurface()->getGridsPerPatchEdge() - 1)* east_patchp->getSurface()->getGridsPerEdge()); // Aurora Sim } else @@ -583,7 +573,7 @@ void LLSurfacePatch::updateNormals() else { // We have a north. - if (getNeighborPatch(EAST)) + if (east_patchp) { // North and east neighbors, but not northeast. // Pull from diagonal in your own patch. @@ -592,13 +582,13 @@ void LLSurfacePatch::updateNormals() } else { - if (getNeighborPatch(NORTH)->getHasReceivedData()) + if (north_patchp->getHasReceivedData()) { // North, but not east. Pull from your north neighbor's southeast corner. *(mDataZ + grids_per_patch_edge + grids_per_patch_edge*grids_per_edge) = // Aurora Sim //*(getNeighborPatch(NORTH)->mDataZ + (grids_per_patch_edge - 1)); - *(getNeighborPatch(NORTH)->mDataZ + (getNeighborPatch(NORTH)->getSurface()->getGridsPerPatchEdge() - 1)); + *(north_patchp->mDataZ + (north_patchp->getSurface()->getGridsPerPatchEdge() - 1)); // Aurora Sim } else @@ -609,25 +599,25 @@ void LLSurfacePatch::updateNormals() } } } - else if (getNeighborPatch(NORTHEAST)->mSurfacep != mSurfacep) + else if (northeast_patchp->mSurfacep != mSurfacep) { if ( - (!getNeighborPatch(NORTH) || (getNeighborPatch(NORTH)->mSurfacep != mSurfacep)) + (!north_patchp || (north_patchp->mSurfacep != mSurfacep)) && - (!getNeighborPatch(EAST) || (getNeighborPatch(EAST)->mSurfacep != mSurfacep))) + (!east_patchp || (east_patchp->mSurfacep != mSurfacep))) { // Aurora Sim U32 own_xpos, own_ypos, neighbor_xpos, neighbor_ypos; S32 own_offset = 0, neighbor_offset = 0; from_region_handle(mSurfacep->getRegion()->getHandle(), &own_xpos, &own_ypos); - from_region_handle(getNeighborPatch(NORTHEAST)->mSurfacep->getRegion()->getHandle(), &neighbor_xpos, &neighbor_ypos); + from_region_handle(northeast_patchp->mSurfacep->getRegion()->getHandle(), &neighbor_xpos, &neighbor_ypos); if (own_ypos >= neighbor_ypos) neighbor_offset = own_ypos - neighbor_ypos; else own_offset = neighbor_ypos - own_ypos; *(mDataZ + grids_per_patch_edge + grids_per_patch_edge*grids_per_edge) = - *(getNeighborPatch(NORTHEAST)->mDataZ + (grids_per_edge + neighbor_offset - own_offset - 1) * getNeighborPatch(NORTHEAST)->getSurface()->getGridsPerEdge()); + *(northeast_patchp->mDataZ + (grids_per_edge + neighbor_offset - own_offset - 1) * northeast_patchp->getSurface()->getGridsPerEdge()); // Aurora Sim } } @@ -656,15 +646,12 @@ void LLSurfacePatch::updateNormals() dirty_patch = TRUE; } - if (dirty_patch) - { - mSurfacep->dirtySurfacePatch(this); - } - for (i = 0; i < 9; i++) { mNormalsInvalid[i] = FALSE; } + + return dirty_patch; } void LLSurfacePatch::updateEastEdge() @@ -719,7 +706,8 @@ void LLSurfacePatch::updateNorthEdge() U32 i; F32 *south_surface, *north_surface; - if (!getNeighborPatch(NORTH)) + LLSurfacePatch* patchp = getNeighborPatch(NORTH); + if (!patchp) { south_surface = mDataZ + grids_per_patch_edge*grids_per_edge; north_surface = mDataZ + (grids_per_patch_edge - 1) * grids_per_edge; @@ -727,7 +715,7 @@ void LLSurfacePatch::updateNorthEdge() else if (mConnectedEdge & NORTH_EDGE) { south_surface = mDataZ + grids_per_patch_edge*grids_per_edge; - north_surface = getNeighborPatch(NORTH)->mDataZ; + north_surface = patchp->mDataZ; } else { @@ -748,10 +736,11 @@ BOOL LLSurfacePatch::updateTexture() F32 meters_per_grid = getSurface()->getMetersPerGrid(); F32 grids_per_patch_edge = (F32)getSurface()->getGridsPerPatchEdge(); - if ((!getNeighborPatch(EAST) || getNeighborPatch(EAST)->getHasReceivedData()) - && (!getNeighborPatch(WEST) || getNeighborPatch(WEST)->getHasReceivedData()) - && (!getNeighborPatch(SOUTH) || getNeighborPatch(SOUTH)->getHasReceivedData()) - && (!getNeighborPatch(NORTH) || getNeighborPatch(NORTH)->getHasReceivedData())) + LLSurfacePatch* patchp; + if ((!(patchp = getNeighborPatch(EAST)) || patchp->getHasReceivedData()) + && (!(patchp = getNeighborPatch(WEST)) || patchp->getHasReceivedData()) + && (!(patchp = getNeighborPatch(SOUTH)) || patchp->getHasReceivedData()) + && (!(patchp = getNeighborPatch(NORTH)) || patchp->getHasReceivedData())) { LLViewerRegion *regionp = getSurface()->getRegion(); LLVector3d origin_region = getOriginGlobal() - getSurface()->getOriginGlobal(); @@ -813,7 +802,7 @@ void LLSurfacePatch::updateGL() } } -void LLSurfacePatch::dirtyZ() +bool LLSurfacePatch::dirtyZ() { mSTexUpdate = TRUE; @@ -827,20 +816,36 @@ void LLSurfacePatch::dirtyZ() // Invalidate normals in this and neighboring patches for (i = 0; i < 8; i++) { - if (getNeighborPatch(i)) + if (mNeighborPatches[i] == nullptr) { - getNeighborPatch(i)->mNormalsInvalid[gDirOpposite[i]] = TRUE; - getNeighborPatch(i)->dirty(); + continue; + } + if (mNeighborPatches[i]->expired()) + { + LL_WARNS() << "Expired neighbor patch detected. Side " << i << LL_ENDL; + delete mNeighborPatches[i]; + mNeighborPatches[i] = nullptr; + continue; + } + const surface_patch_ref& patchp = mNeighborPatches[i]->lock(); + if (patchp) + { + patchp->mNormalsInvalid[gDirOpposite[i]] = TRUE; + if (patchp->dirty()) + { + patchp->getSurface()->dirtySurfacePatch(patchp); + } if (i < 4) { - getNeighborPatch(i)->mNormalsInvalid[gDirAdjacent[gDirOpposite[i]][0]] = TRUE; - getNeighborPatch(i)->mNormalsInvalid[gDirAdjacent[gDirOpposite[i]][1]] = TRUE; + patchp->mNormalsInvalid[gDirAdjacent[gDirOpposite[i]][0]] = TRUE; + patchp->mNormalsInvalid[gDirAdjacent[gDirOpposite[i]][1]] = TRUE; } } } - dirty(); mLastUpdateTime = gFrameTime; + + return dirty(); } @@ -877,35 +882,29 @@ void LLSurfacePatch::setOriginGlobal(const LLVector3d &origin_global) } -void LLSurfacePatch::connectNeighbor(LLSurfacePatch *neighbor_patchp, const U32 direction) +void LLSurfacePatch::connectNeighbor(const surface_patch_ref& neighbor_patchp, const U32 direction) { llassert(neighbor_patchp); if (!neighbor_patchp) return; mNormalsInvalid[direction] = TRUE; - neighbor_patchp->mNormalsInvalid[gDirOpposite[direction]] = TRUE; setNeighborPatch(direction, neighbor_patchp); - neighbor_patchp->setNeighborPatch(gDirOpposite[direction], this); if (EAST == direction) { mConnectedEdge |= EAST_EDGE; - neighbor_patchp->mConnectedEdge |= WEST_EDGE; } else if (NORTH == direction) { mConnectedEdge |= NORTH_EDGE; - neighbor_patchp->mConnectedEdge |= SOUTH_EDGE; } else if (WEST == direction) { mConnectedEdge |= WEST_EDGE; - neighbor_patchp->mConnectedEdge |= EAST_EDGE; } else if (SOUTH == direction) { mConnectedEdge |= SOUTH_EDGE; - neighbor_patchp->mConnectedEdge |= NORTH_EDGE; } } @@ -963,13 +962,14 @@ void LLSurfacePatch::updateVisibility() if (mVObjp) { mVObjp->dirtyGeom(); - if (getNeighborPatch(WEST)) + LLSurfacePatch* patchp; + if (patchp = getNeighborPatch(WEST)) { - getNeighborPatch(WEST)->mVObjp->dirtyGeom(); + patchp->mVObjp->dirtyGeom(); } - if (getNeighborPatch(SOUTH)) + if (patchp = getNeighborPatch(SOUTH)) { - getNeighborPatch(SOUTH)->mVObjp->dirtyGeom(); + patchp->mVObjp->dirtyGeom(); } } } @@ -1074,9 +1074,21 @@ F32 LLSurfacePatch::getMaxComposition() const return mMaxComposition; } -void LLSurfacePatch::setNeighborPatch(const U32 direction, LLSurfacePatch *neighborp) +void LLSurfacePatch::setNeighborPatch(const U32 direction, const surface_patch_ref& neighborp) { - mNeighborPatches[direction] = neighborp; + if (!neighborp) + { + delete mNeighborPatches[direction]; + mNeighborPatches[direction] = nullptr; + } + else + { + if (mNeighborPatches[direction] == nullptr) + { + mNeighborPatches[direction] = new surface_patch_weak_ref(); + } + *mNeighborPatches[direction] = neighborp; + } mNormalsInvalid[direction] = TRUE; if (direction < 4) { @@ -1087,7 +1099,15 @@ void LLSurfacePatch::setNeighborPatch(const U32 direction, LLSurfacePatch *neigh LLSurfacePatch *LLSurfacePatch::getNeighborPatch(const U32 direction) const { - return mNeighborPatches[direction]; + if (mNeighborPatches[direction] == nullptr) + { + return nullptr; + } + else if (mNeighborPatches[direction]->expired()) + { + LL_WARNS() << "Expired neighbor patch detected. Side " << direction << LL_ENDL; + } + return mNeighborPatches[direction]->lock().get(); } void LLSurfacePatch::clearVObj() diff --git a/indra/newview/llsurfacepatch.h b/indra/newview/llsurfacepatch.h index ebfb64c1d..8d6447e7f 100644 --- a/indra/newview/llsurfacepatch.h +++ b/indra/newview/llsurfacepatch.h @@ -43,6 +43,10 @@ class LLVector2; class LLColor4U; class LLAgent; +class LLSurfacePatch; +typedef std::shared_ptr surface_patch_ref; +typedef std::weak_ptr surface_patch_weak_ref; + // A patch shouldn't know about its visibility since that really depends on the // camera that is looking (or not looking) at it. So, anything about a patch // that is specific to a camera should be in the class below. @@ -64,26 +68,23 @@ public: -class LLSurfacePatch +class LLSurfacePatch { public: - LLSurfacePatch(); + LLSurfacePatch(LLSurface* surface, U32 side); ~LLSurfacePatch(); - void reset(const U32 id); - void connectNeighbor(LLSurfacePatch *neighborp, const U32 direction); + void connectNeighbor(const surface_patch_ref& neighbor_patchp, const U32 direction); void disconnectNeighbor(LLSurface *surfacep); - void setNeighborPatch(const U32 direction, LLSurfacePatch *neighborp); + void setNeighborPatch(const U32 direction, const surface_patch_ref& neighborp); LLSurfacePatch *getNeighborPatch(const U32 direction) const; - void colorPatch(const U8 r, const U8 g, const U8 b); - BOOL updateTexture(); void updateVerticalStats(); void updateCompositionStats(); - void updateNormals(); + bool updateNormals(); void updateEastEdge(); void updateNorthEdge(); @@ -92,7 +93,7 @@ public: void updateVisibility(); void updateGL(); - void dirtyZ(); // Dirty the z values of this patch + bool dirtyZ(); // Dirty the z values of this patch void setHasReceivedData(); BOOL getHasReceivedData() const; @@ -139,17 +140,19 @@ public: void setDataNorm(LLVector3 *data_norm) { mDataNorm = data_norm; } F32 *getDataZ() const { return mDataZ; } - void dirty(); // Mark this surface patch as dirty... + bool dirty(); // Mark this surface patch as dirty... void clearDirty() { mDirty = FALSE; } void clearVObj(); + U32 getSide() const { return mSide; } + public: BOOL mHasReceivedData; // has the patch EVER received height data? BOOL mSTexUpdate; // Does the surface texture need to be updated? protected: - LLSurfacePatch *mNeighborPatches[8]; // Adjacent patches + std::weak_ptr* mNeighborPatches[8]; // Adjacent patches BOOL mNormalsInvalid[9]; // Which normals are invalid BOOL mDirty; @@ -184,6 +187,8 @@ protected: // of LLSurface that is "connected" to another LLSurface U64 mLastUpdateTime; // Time patch was last updated + U32 mSide; // Side relative to parent surface. + LLSurface *mSurfacep; // Pointer to "parent" surface }; diff --git a/indra/newview/lltoolbrush.cpp b/indra/newview/lltoolbrush.cpp index e5cfdc1ae..79a9d6c6c 100644 --- a/indra/newview/lltoolbrush.cpp +++ b/indra/newview/lltoolbrush.cpp @@ -164,10 +164,10 @@ void LLToolBrushLand::modifyLandAtPointGlobal(const LLVector3d &pos_global, //if(!is_changed) continue; // Now to update the patch information so it will redraw correctly. - LLSurfacePatch *patchp= land.resolvePatchRegion(pos_region); - if (patchp) + auto& patchp = land.resolvePatchRegion(pos_region); + if (patchp && patchp->dirtyZ()) { - patchp->dirtyZ(); + patchp->getSurface()->dirtySurfacePatch(patchp); } // Also force the property lines to update, normals to recompute, etc. @@ -305,10 +305,10 @@ void LLToolBrushLand::modifyLandInSelectionGlobal() //if(!is_changed) continue; // Now to update the patch information so it will redraw correctly. - LLSurfacePatch *patchp= land.resolvePatchRegion(min_region); - if (patchp) + auto& patchp = land.resolvePatchRegion(min_region); + if (patchp && patchp->dirtyZ()) { - patchp->dirtyZ(); + patchp->getSurface()->dirtySurfacePatch(patchp); } // Also force the property lines to update, normals to recompute, etc. diff --git a/indra/newview/llviewerdisplayname.cpp b/indra/newview/llviewerdisplayname.cpp index c7f817032..1e559072a 100644 --- a/indra/newview/llviewerdisplayname.cpp +++ b/indra/newview/llviewerdisplayname.cpp @@ -56,25 +56,22 @@ namespace LLViewerDisplayName void doNothing() { } } -class LLSetDisplayNameResponder : public LLHTTPClient::ResponderIgnoreBody +class LLSetDisplayNameResponder final : public LLHTTPClient::ResponderIgnoreBody { LOG_CLASS(LLSetDisplayNameResponder); private: // only care about errors - /*virtual*/ void httpFailure() + void httpFailure() override { - LL_WARNS() << dumpResponse() << LL_ENDL; - LLViewerDisplayName::sSetDisplayNameSignal(false, "", LLSD()); + LLViewerDisplayName::sSetDisplayNameSignal(false, LLStringUtil::null, LLSD()); LLViewerDisplayName::sSetDisplayNameSignal.disconnect_all_slots(); } - /*virtual*/ char const* getName(void) const { return "LLSetDisplayNameResponder"; } + char const* getName() const override { return "LLSetDisplayNameResponder"; } }; void LLViewerDisplayName::set(const std::string& display_name, const set_name_slot_t& slot) { - // TODO: simple validation here - LLViewerRegion* region = gAgent.getRegion(); llassert(region); std::string cap_url = region->getCapability("SetDisplayName"); @@ -93,7 +90,7 @@ void LLViewerDisplayName::set(const std::string& display_name, const set_name_sl // Our display name will be in cache before the viewer's UI is available // to request a change, so we can use direct lookup without callback. LLAvatarName av_name; - if (!LLAvatarNameCache::get( gAgent.getID(), &av_name)) + if (!LLAvatarNameCache::get(gAgent.getID(), &av_name)) { slot(false, "name unavailable", LLSD()); return; @@ -104,8 +101,6 @@ void LLViewerDisplayName::set(const std::string& display_name, const set_name_sl change_array.append(av_name.getDisplayName()); change_array.append(display_name); - LL_INFOS() << "Set name POST to " << cap_url << LL_ENDL; - // Record our caller for when the server sends back a reply sSetDisplayNameSignal.connect(slot); @@ -117,14 +112,14 @@ void LLViewerDisplayName::set(const std::string& display_name, const set_name_sl LLHTTPClient::post(cap_url, body, new LLSetDisplayNameResponder, headers); } -class LLSetDisplayNameReply : public LLHTTPNode +class LLSetDisplayNameReply final : public LLHTTPNode { LOG_CLASS(LLSetDisplayNameReply); public: /*virtual*/ void post( LLHTTPNode::ResponsePtr response, const LLSD& context, - const LLSD& input) const + const LLSD& input) const override { LLSD body = input["body"]; @@ -157,12 +152,12 @@ public: }; -class LLDisplayNameUpdate : public LLHTTPNode +class LLDisplayNameUpdate final : public LLHTTPNode { /*virtual*/ void post( LLHTTPNode::ResponsePtr response, const LLSD& context, - const LLSD& input) const + const LLSD& input) const override { LLSD body = input["body"]; LLUUID agent_id = body["agent_id"]; @@ -195,7 +190,7 @@ class LLDisplayNameUpdate : public LLHTTPNode { LLSD args; args["OLD_NAME"] = old_display_name; - args["SLID"] = av_name.getUserName(); + args["SLID"] = "secondlife:///app/agent/" + agent_id.asString() + "/username"; args["NEW_NAME"] = av_name.getDisplayName(); LLNotificationsUtil::add("DisplayNameUpdate", args); } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index a8cb81e03..4fefe7e45 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -480,7 +480,7 @@ void reset_vertex_buffers(void *user_data) gPipeline.resetVertexBuffers(); } -class LLMenuParcelObserver : public LLParcelObserver +class LLMenuParcelObserver final : public LLParcelObserver { public: LLMenuParcelObserver(); @@ -1700,9 +1700,9 @@ void init_server_menu(LLMenuGL* menu) ////////////////////// /* -class LLAdvancedToggleWireframe : public view_listener_t +class LLAdvancedToggleWireframe final : public view_listener_t { - bool handleEvent(const LLSD& userdata) + bool handleEvent(const LLSD& userdata) override */ void advanced_toggle_wireframe(void*) { @@ -1724,9 +1724,9 @@ class LLAdvancedToggleWireframe : public view_listener_t /* }; -class LLAdvancedCheckWireframe : public view_listener_t +class LLAdvancedCheckWireframe final : public view_listener_t { - bool handleEvent(const LLSD& userdata) + bool handleEvent(const LLSD& userdata) override */ BOOL advanced_check_wireframe(void*) { @@ -1772,9 +1772,9 @@ void cleanup_menus() // Object pie menu //----------------------------------------------------------------------------- -class LLObjectReportAbuse : public view_listener_t +class LLObjectReportAbuse final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); if (objectp) @@ -1786,9 +1786,9 @@ class LLObjectReportAbuse : public view_listener_t }; // Enabled it you clicked an object -class LLObjectEnableReportAbuse : public view_listener_t +class LLObjectEnableReportAbuse final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLSelectMgr::getInstance()->getSelection()->getObjectCount() != 0; gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -1796,9 +1796,9 @@ class LLObjectEnableReportAbuse : public view_listener_t } }; -class LLObjectTouch : public view_listener_t +class LLObjectTouch final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_object_touch(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(), &LLToolPie::getInstance()->getPick()); return true; @@ -1861,9 +1861,9 @@ bool enable_object_touch(const LLSD& userdata) }; // One object must have touch sensor -class LLObjectEnableTouch : public view_listener_t +class LLObjectEnableTouch final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(enable_object_touch(userdata)); return true; @@ -1892,9 +1892,9 @@ void handle_object_open() // LLFloaterOpenObject::show(); } -class LLObjectOpen : public view_listener_t +class LLObjectOpen final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_object_open(); return true; @@ -1914,9 +1914,9 @@ bool enable_object_open() return root->allowOpen(); } -class LLObjectEnableOpen : public view_listener_t +class LLObjectEnableOpen final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(enable_object_open()); @@ -1924,18 +1924,18 @@ class LLObjectEnableOpen : public view_listener_t } }; -class LLViewJoystickFlycam : public view_listener_t +class LLViewJoystickFlycam final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_toggle_flycam(); return true; } }; -class LLViewCheckJoystickFlycam : public view_listener_t +class LLViewCheckJoystickFlycam final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLViewerJoystick::getInstance()->getOverrideCamera(); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -1949,9 +1949,9 @@ void handle_toggle_flycam() LLViewerJoystick::getInstance()->toggleFlycam(); } -class LLObjectBuild : public view_listener_t +class LLObjectBuild final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { if (gAgentCamera.getFocusOnAvatar() && !LLToolMgr::getInstance()->inEdit() && gSavedSettings.getBOOL("EditCameraMovement") ) { @@ -2043,9 +2043,9 @@ void handle_object_edit() return; } -class LLObjectEdit : public view_listener_t +class LLObjectEdit final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_object_edit(); return true; @@ -2092,9 +2092,9 @@ bool add_object_to_blacklist( const LLUUID& id, const std::string& entry_name ) } // Derenderizer. Originally by Phox. -class LLObjectDerender : public view_listener_t +class LLObjectDerender final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerObject* slct = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); if(!slct)return true; @@ -2246,9 +2246,9 @@ void reload_objects(LLTextureReloader& texture_list, LLViewerObject::const_child } } -class LLAvatarReloadTextures : public view_listener_t +class LLAvatarReloadTextures final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); if(avatar) @@ -2279,9 +2279,9 @@ class LLAvatarReloadTextures : public view_listener_t return true; } }; -class LLObjectReloadTextures : public view_listener_t +class LLObjectReloadTextures final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerObject::vobj_list_t object_list; @@ -2301,9 +2301,9 @@ class LLObjectReloadTextures : public view_listener_t //--------------------------------------------------------------------------- // Land pie menu //--------------------------------------------------------------------------- -class LLLandBuild : public view_listener_t +class LLLandBuild final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerParcelMgr::getInstance()->deselectLand(); @@ -2333,18 +2333,18 @@ class LLLandBuild : public view_listener_t } }; -class LLLandBuyPass : public view_listener_t +class LLLandBuyPass final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLPanelLandGeneral::onClickBuyPass((void *)FALSE); return true; } }; -class LLLandEnableBuyPass : public view_listener_t +class LLLandEnableBuyPass final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLPanelLandGeneral::enableBuyPass(nullptr); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -2414,9 +2414,9 @@ bool enable_object_edit() return enable; } -class LLEnableEdit : public view_listener_t +class LLEnableEdit final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(enable_object_edit()); return true; @@ -2429,17 +2429,17 @@ bool enable_object_select_in_pathfinding_linksets() return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() && LLSelectMgr::getInstance()->selectGetEditableLinksets(); } -class LLObjectEnablePFLinksetsSelected : public view_listener_t +class LLObjectEnablePFLinksetsSelected final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { return enable_object_select_in_pathfinding_linksets(); } }; -class LLObjectPFCharactersSelected : public view_listener_t +class LLObjectPFCharactersSelected final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLFloaterPathfindingCharacters::openCharactersWithSelectedObjects(); return true; @@ -2451,26 +2451,26 @@ bool enable_object_select_in_pathfinding_characters() return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() && LLSelectMgr::getInstance()->selectGetViewableCharacters(); } -class LLObjectEnablePFCharactersSelected : public view_listener_t +class LLObjectEnablePFCharactersSelected final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { return enable_object_select_in_pathfinding_characters(); } }; -class LLSelfRemoveAllAttachments : public view_listener_t +class LLSelfRemoveAllAttachments final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLAppearanceMgr::instance().removeAllAttachmentsFromAvatar(); return true; } }; -class LLSelfEnableRemoveAllAttachments : public view_listener_t +class LLSelfEnableRemoveAllAttachments final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = false; if (isAgentAvatarValid()) @@ -2495,9 +2495,9 @@ class LLSelfEnableRemoveAllAttachments : public view_listener_t } }; -class LLSelfVisibleScriptInfo : public view_listener_t +class LLSelfVisibleScriptInfo final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { if (LLViewerRegion* region = gAgent.getRegion()) gMenuHolder->findControl(userdata["control"].asString())->setValue(!region->getCapability("AttachmentResources").empty()); @@ -2515,9 +2515,9 @@ BOOL enable_has_attachments(void*) // Avatar pie menu //--------------------------------------------------------------------------- -class LLObjectFollow : public view_listener_t +class LLObjectFollow final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // follow a given avatar by ID LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); @@ -2556,18 +2556,18 @@ bool enable_object_mute() } } -class LLObjectEnableMute : public view_listener_t +class LLObjectEnableMute final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(enable_object_mute()); return true; } }; -class LLObjectMute : public view_listener_t +class LLObjectMute final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); if (!object) return true; @@ -2617,7 +2617,7 @@ class LLObjectMute : public view_listener_t else { LLMuteList::getInstance()->add(mute); - LLFloaterMute::showInstance(); + LLFloaterMute::showInstance()->selectMute(mute.mID);; } return true; @@ -2625,9 +2625,9 @@ class LLObjectMute : public view_listener_t }; // -class LLObjectEnableCopyUUID : public view_listener_t +class LLObjectEnableCopyUUID final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); bool new_value = (object != nullptr); @@ -2636,9 +2636,9 @@ class LLObjectEnableCopyUUID : public view_listener_t } }; -class LLObjectCopyUUID : public view_listener_t +class LLObjectCopyUUID final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); if(object) @@ -2649,9 +2649,9 @@ class LLObjectCopyUUID : public view_listener_t } }; -class LLObjectData : public view_listener_t +class LLObjectData final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); if(object) @@ -2678,9 +2678,9 @@ class LLObjectData : public view_listener_t } }; -class LLSyncAnimations : public view_listener_t +class LLSyncAnimations final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { void resync_anims(); resync_anims(); @@ -2688,9 +2688,9 @@ class LLSyncAnimations : public view_listener_t } }; -class LLCanIHasKillEmAll : public view_listener_t +class LLCanIHasKillEmAll final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerObject* objpos = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(); bool new_value = false; @@ -2706,9 +2706,9 @@ class LLCanIHasKillEmAll : public view_listener_t } }; -class LLOHGOD : public view_listener_t +class LLOHGOD final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerObject* objpos = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(); bool new_value = false; @@ -2725,9 +2725,9 @@ class LLOHGOD : public view_listener_t } }; -class LLPowerfulWizard : public view_listener_t +class LLPowerfulWizard final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerObject* objpos = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(); if(objpos) @@ -2761,9 +2761,9 @@ class LLPowerfulWizard : public view_listener_t } }; -class LLKillEmAll : public view_listener_t +class LLKillEmAll final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // Originally by SimmanFederal // Moved here by a big fat fuckin dog. @@ -2803,9 +2803,9 @@ class LLKillEmAll : public view_listener_t } }; -class LLObjectMeasure : public view_listener_t +class LLObjectMeasure final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { static LLVector3 startMeasurePoint = LLVector3::zero; static bool startpoint_set = false; @@ -2842,9 +2842,9 @@ class LLObjectMeasure : public view_listener_t } }; -class LLObjectPFLinksetsSelected : public view_listener_t +class LLObjectPFLinksetsSelected final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLFloaterPathfindingLinksets::openLinksetsWithSelectedObjects(); return true; @@ -2892,18 +2892,18 @@ void handle_go_to(const LLVector3d& pos) LLFirstUse::useGoTo(); } -class LLGoToObject : public view_listener_t +class LLGoToObject final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_go_to(LLToolPie::instance().getPick().mPosGlobal); return true; } }; -class LLAvatarReportAbuse : public view_listener_t +class LLAvatarReportAbuse final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); if(avatar) @@ -2918,9 +2918,9 @@ class LLAvatarReportAbuse : public view_listener_t // Object backup //--------------------------------------------------------------------------- -class LLObjectEnableExport : public view_listener_t +class LLObjectEnableExport final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { ExportPolicy export_policy = LFSimFeatureHandler::instance().exportPolicy(); bool can_export_any = false; @@ -2938,36 +2938,36 @@ class LLObjectEnableExport : public view_listener_t } }; -class LLObjectExport : public view_listener_t +class LLObjectExport final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLObjectBackup::getInstance()->exportObject(); return true; } }; -class LLObjectEnableImport : public view_listener_t +class LLObjectEnableImport final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(TRUE); return true; } }; -class LLObjectImport : public view_listener_t +class LLObjectImport final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLObjectBackup::getInstance()->importObject(FALSE); return true; } }; -class LLObjectImportUpload : public view_listener_t +class LLObjectImportUpload final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLObjectBackup::getInstance()->importObject(TRUE); return true; @@ -3033,9 +3033,9 @@ void handle_avatar_freeze(const LLSD& avatar_id) } } -class LLAvatarFreeze : public view_listener_t +class LLAvatarFreeze final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_avatar_freeze(LLUUID::null); return true; @@ -3053,27 +3053,27 @@ void do_script_count(bool del, LLViewerObject* object = nullptr) } } -class LLScriptCount : public view_listener_t +class LLScriptCount final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { do_script_count(false, userdata["data"].asString() == "agent" ? gAgentAvatarp : nullptr); return true; } }; -class LLScriptDelete : public view_listener_t +class LLScriptDelete final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { do_script_count(true); return true; } }; -class LLObjectVisibleScriptCount : public view_listener_t +class LLObjectVisibleScriptCount final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerObject* object = userdata["data"].asString() == "agent" ? gAgentAvatarp : LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); bool new_value = (object != nullptr); @@ -3083,9 +3083,9 @@ class LLObjectVisibleScriptCount : public view_listener_t } }; -class LLObjectEnableScriptDelete : public view_listener_t +class LLObjectEnableScriptDelete final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { auto objects = LLSelectMgr::getInstance()->getSelection(); LLViewerObject* object = objects->getPrimaryObject(); @@ -3108,18 +3108,18 @@ class LLObjectEnableScriptDelete : public view_listener_t } }; -class LLAvatarVisibleDebug : public view_listener_t +class LLAvatarVisibleDebug final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(gAgent.isGodlike()); return true; } }; -class LLAvatarDebug : public view_listener_t +class LLAvatarDebug final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { if (isAgentAvatarValid()) { @@ -3256,9 +3256,9 @@ void handle_avatar_eject(const LLSD& avatar_id) } } -class LLAvatarEject : public view_listener_t +class LLAvatarEject final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_avatar_eject(LLUUID::null); return true; @@ -3266,9 +3266,9 @@ class LLAvatarEject : public view_listener_t }; -class LLAvatarCopyUUID : public view_listener_t +class LLAvatarCopyUUID final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); if(!avatar) return true; @@ -3278,9 +3278,9 @@ class LLAvatarCopyUUID : public view_listener_t } }; -class LLAvatarClientUUID : public view_listener_t +class LLAvatarClientUUID final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); if(!avatar) return true; @@ -3324,18 +3324,18 @@ bool enable_freeze_eject(const LLSD& avatar_id) return new_value; } -class LLAvatarEnableFreezeEject : public view_listener_t +class LLAvatarEnableFreezeEject final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(enable_freeze_eject(LLUUID::null)); return true; } }; -class LLAvatarGiveCard : public view_listener_t +class LLAvatarGiveCard final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LL_INFOS() << "handle_give_card()" << LL_ENDL; LLViewerObject* dest = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); @@ -3453,9 +3453,9 @@ bool enable_buy_object() } -class LLObjectEnableBuy : public view_listener_t +class LLObjectEnableBuy final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = enable_buy_object(); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -3576,9 +3576,9 @@ void handle_dump_focus(void *) LL_INFOS() << "Keyboard focus " << (ctrl ? ctrl->getName() : "(none)") << LL_ENDL; } -class LLSelfSitOrStand : public view_listener_t +class LLSelfSitOrStand final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gAgent.stopAutoPilot(true); if (gAgentAvatarp && gAgentAvatarp->isSitting()) @@ -3612,9 +3612,9 @@ bool enable_sitdown_self() // return isAgentAvatarValid() && !gAgentAvatarp->isSitting() && !gAgent.getFlying(); } -class LLSelfEnableSitOrStand : public view_listener_t +class LLSelfEnableSitOrStand final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { std::string label; std::string sit_text; @@ -3751,7 +3751,7 @@ void handle_fake_away_status(void*) // /* -class LLHaveCallingcard : public LLInventoryCollectFunctor +class LLHaveCallingcard final : public LLInventoryCollectFunctor { public: LLHaveCallingcard(const LLUUID& agent_id); @@ -3797,9 +3797,9 @@ BOOL is_agent_mappable(const LLUUID& agent_id) // Enable a menu item when you don't have someone's card. -class LLAvatarEnableAddFriend : public view_listener_t +class LLAvatarEnableAddFriend final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()); // bool new_value = avatar && !LLAvatarActions::isFriend(avatar->getID()); @@ -3836,9 +3836,9 @@ void request_friendship(const LLUUID& dest_id) } -class LLEditEnableCustomizeAvatar : public view_listener_t +class LLEditEnableCustomizeAvatar final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = (gAgentAvatarp && gAgentAvatarp->isFullyLoaded() && @@ -3849,9 +3849,9 @@ class LLEditEnableCustomizeAvatar : public view_listener_t }; -class LLEditEnableChangeDisplayname : public view_listener_t +class LLEditEnableChangeDisplayname final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(LLAvatarName::useDisplayNames()); return true; @@ -3938,9 +3938,9 @@ void handle_object_sit_or_stand() handle_object_sit(object, pick.mObjectOffset); } -class LLObjectSitOrStand : public view_listener_t +class LLObjectSitOrStand final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_object_sit_or_stand(); return true; @@ -3960,9 +3960,9 @@ void near_sit_down_point(BOOL success, void *) } } -class LLLandSit : public view_listener_t +class LLLandSit final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.2.1f if ( (rlv_handler_t::isEnabled()) && ((!RlvActions::canStand()) || (gRlvHandler.hasBehaviour(RLV_BHVR_SIT))) ) @@ -3988,28 +3988,28 @@ class LLLandSit : public view_listener_t } }; -class LLCreateLandmarkCallback : public LLInventoryCallback +class LLCreateLandmarkCallback final : public LLInventoryCallback { public: - /*virtual*/ void fire(const LLUUID& inv_item) + void fire(const LLUUID& inv_item) override { LL_INFOS() << "Created landmark with inventory id " << inv_item << LL_ENDL; } }; -class LLWorldFly : public view_listener_t +class LLWorldFly final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gAgent.toggleFlying(); return true; } }; -class LLWorldEnableFly : public view_listener_t +class LLWorldEnableFly final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(gAgent.enableFlying()); return true; @@ -4101,9 +4101,9 @@ void handle_reset_view() } } -class LLViewResetView : public view_listener_t +class LLViewResetView final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_reset_view(); return true; @@ -4146,36 +4146,36 @@ void reset_view_final( BOOL proceed ) } -class LLViewResetPresetAngles : public view_listener_t +class LLViewResetPresetAngles final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gAgentCamera.resetPresetOffsets(); return true; } }; -class LLViewLookAtLastChatter : public view_listener_t +class LLViewLookAtLastChatter final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gAgentCamera.lookAtLastChat(); return true; } }; -class LLViewFullscreen : public view_listener_t +class LLViewFullscreen final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gViewerWindow->toggleFullscreen(TRUE); return true; } }; -class LLViewDefaultUISize : public view_listener_t +class LLViewDefaultUISize final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gSavedSettings.setF32("UIScaleFactor", 1.0f); gSavedSettings.setBOOL("UIAutoScale", FALSE); @@ -4184,9 +4184,9 @@ class LLViewDefaultUISize : public view_listener_t } }; -class LLEditDuplicate : public view_listener_t +class LLEditDuplicate final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) && @@ -4204,9 +4204,9 @@ class LLEditDuplicate : public view_listener_t } }; -class LLEditEnableDuplicate : public view_listener_t +class LLEditEnableDuplicate final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canDuplicate(); // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) @@ -4628,9 +4628,9 @@ static void derez_objects(EDeRezDestination dest, const LLUUID& dest_id) derez_objects(dest, dest_id, first_region, error, nullptr); } -class LLToolsTakeCopy : public view_listener_t +class LLToolsTakeCopy final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_take_copy(); return true; @@ -4657,13 +4657,13 @@ void handle_take_copy() } // You can return an object to its owner if it is on your land. -class LLObjectReturn : public view_listener_t +class LLObjectReturn final : public view_listener_t { public: LLObjectReturn() : mFirstRegion(nullptr) {} private: - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return true; // [RLVa:KB] - Checked: 2010-03-24 (RLVa-1.4.0a) | Modified: RLVa-1.0.0b @@ -4707,9 +4707,9 @@ private: // Allow return to owner if one or more of the selected items is // over land you own. -class LLObjectEnableReturn : public view_listener_t +class LLObjectEnableReturn final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) { @@ -4942,9 +4942,9 @@ void handle_buy_or_take() } } -class LLToolsBuyOrTake : public view_listener_t +class LLToolsBuyOrTake final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_buy_or_take(); return true; @@ -4956,9 +4956,9 @@ bool visible_take_object() return !is_selection_buy_not_take() && enable_take(); } -class LLToolsEnableBuyOrTake : public view_listener_t +class LLToolsEnableBuyOrTake final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool is_buy = is_selection_buy_not_take(); bool new_value = is_buy ? enable_buy_object() : enable_take(); @@ -5092,9 +5092,9 @@ void handle_buy() } } -class LLObjectBuy : public view_listener_t +class LLObjectBuy final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_buy(); return true; @@ -5141,9 +5141,9 @@ BOOL sitting_on_selection() return (gAgentAvatarp->isSitting() && gAgentAvatarp->getRoot() == root_object); } -class LLToolsSaveToInventory : public view_listener_t +class LLToolsSaveToInventory final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool enable_save_into_inventory(); if(enable_save_into_inventory()) @@ -5154,9 +5154,9 @@ class LLToolsSaveToInventory : public view_listener_t } }; -class LLToolsSaveToObjectInventory : public view_listener_t +class LLToolsSaveToObjectInventory final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(); if(node && (node->mValid) && (!node->mFromTaskID.isNull())) @@ -5168,25 +5168,25 @@ class LLToolsSaveToObjectInventory : public view_listener_t } }; -class LLToolsEnablePathfinding : public view_listener_t +class LLToolsEnablePathfinding final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { return (LLPathfindingManager::getInstance() != nullptr) && LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion(); } }; -class LLToolsEnablePathfindingView : public view_listener_t +class LLToolsEnablePathfindingView final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { return (LLPathfindingManager::getInstance() != nullptr) && LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() && LLPathfindingManager::getInstance()->isPathfindingViewEnabled(); } }; -class LLToolsDoPathfindingRebakeRegion : public view_listener_t +class LLToolsDoPathfindingRebakeRegion final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool hasPathfinding = (LLPathfindingManager::getInstance() != nullptr); @@ -5199,9 +5199,9 @@ class LLToolsDoPathfindingRebakeRegion : public view_listener_t } }; -class LLToolsEnablePathfindingRebakeRegion : public view_listener_t +class LLToolsEnablePathfindingRebakeRegion final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool returnValue = false; @@ -5217,9 +5217,9 @@ class LLToolsEnablePathfindingRebakeRegion : public view_listener_t }; // Round the position of all root objects to the grid -class LLToolsSnapObjectXY : public view_listener_t +class LLToolsSnapObjectXY final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { F64 snap_size = (F64)gSavedSettings.getF32("GridResolution"); @@ -5264,9 +5264,9 @@ class LLToolsSnapObjectXY : public view_listener_t }; // Determine if the option to cycle between linked prims is shown -class LLToolsEnableSelectNextPart : public view_listener_t +class LLToolsEnableSelectNextPart final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = (gSavedSettings.getBOOL("EditLinkedParts") && !LLSelectMgr::getInstance()->getSelection()->isEmpty()); @@ -5278,9 +5278,9 @@ class LLToolsEnableSelectNextPart : public view_listener_t // Cycle selection through linked children in selected object. // FIXME: Order of children list is not always the same as sim's idea of link order. This may confuse // resis. Need link position added to sim messages to address this. -class LLToolsSelectNextPart : public view_listener_t +class LLToolsSelectNextPart final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { S32 object_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount(); if (gSavedSettings.getBOOL("EditLinkedParts") && object_count) @@ -5362,9 +5362,9 @@ class LLToolsSelectNextPart : public view_listener_t // otherwise. this allows the handle_link method to more finely check // the selection and give an error message when the uer has a // reasonable expectation for the link to work, but it will fail. -class LLToolsEnableLink : public view_listener_t +class LLToolsEnableLink final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLSelectMgr::getInstance()->enableLinkObjects(); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -5372,17 +5372,17 @@ class LLToolsEnableLink : public view_listener_t } }; -class LLToolsLink : public view_listener_t +class LLToolsLink final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { return LLSelectMgr::getInstance()->linkObjects(); } }; -class LLToolsEnableUnlink : public view_listener_t +class LLToolsEnableUnlink final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLSelectMgr::getInstance()->enableUnlinkObjects(); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -5390,9 +5390,9 @@ class LLToolsEnableUnlink : public view_listener_t } }; -class LLToolsUnlink : public view_listener_t +class LLToolsUnlink final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLSelectMgr::getInstance()->unlinkObjects(); return true; @@ -5400,18 +5400,18 @@ class LLToolsUnlink : public view_listener_t }; -class LLToolsStopAllAnimations : public view_listener_t +class LLToolsStopAllAnimations final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gAgent.stopCurrentAnimations(); return true; } }; -class LLToolsReleaseKeys : public view_listener_t +class LLToolsReleaseKeys final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // [RLVa:KB] - Checked: 2010-04-19 (RLVa-1.2.0f) | Modified: RLVa-1.0.5a | OK if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_REMOVE)) ) @@ -5423,9 +5423,9 @@ class LLToolsReleaseKeys : public view_listener_t } }; -class LLToolsEnableReleaseKeys : public view_listener_t +class LLToolsEnableReleaseKeys final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // [RLVa:KB] - Checked: 2010-04-19 (RLVa-1.2.0f) | Modified: RLVa-1.0.5a gMenuHolder->findControl(userdata["control"].asString())->setValue(gAgent.anyControlGrabbed() && @@ -5437,9 +5437,9 @@ class LLToolsEnableReleaseKeys : public view_listener_t }; -class LLEditEnableCut : public view_listener_t +class LLEditEnableCut final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canCut(); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -5447,9 +5447,9 @@ class LLEditEnableCut : public view_listener_t } }; -class LLEditCut : public view_listener_t +class LLEditCut final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { if( LLEditMenuHandler::gEditMenuHandler ) { @@ -5459,9 +5459,9 @@ class LLEditCut : public view_listener_t } }; -class LLEditEnableCopy : public view_listener_t +class LLEditEnableCopy final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canCopy(); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -5469,9 +5469,9 @@ class LLEditEnableCopy : public view_listener_t } }; -class LLEditCopy : public view_listener_t +class LLEditCopy final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { if( LLEditMenuHandler::gEditMenuHandler ) { @@ -5481,9 +5481,9 @@ class LLEditCopy : public view_listener_t } }; -class LLEditEnablePaste : public view_listener_t +class LLEditEnablePaste final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canPaste(); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -5491,9 +5491,9 @@ class LLEditEnablePaste : public view_listener_t } }; -class LLEditPaste : public view_listener_t +class LLEditPaste final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { if( LLEditMenuHandler::gEditMenuHandler ) { @@ -5503,9 +5503,9 @@ class LLEditPaste : public view_listener_t } }; -class LLEditEnableDelete : public view_listener_t +class LLEditEnableDelete final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canDoDelete(); @@ -5522,9 +5522,9 @@ class LLEditEnableDelete : public view_listener_t } }; -class LLEditDelete : public view_listener_t +class LLEditDelete final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) // NOTE: we want to disable delete on objects but not disable delete on text @@ -5558,9 +5558,9 @@ bool enable_object_return() (gAgent.isGodlike() || can_derez(DRD_RETURN_TO_OWNER))); } -class LLObjectEnableDelete : public view_listener_t +class LLObjectEnableDelete final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(enable_object_delete()); return true; @@ -5631,9 +5631,9 @@ void handle_object_return() } } -class LLObjectDelete : public view_listener_t +class LLObjectDelete final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) if ( (rlv_handler_t::isEnabled()) && (!rlvCanDeleteOrReturn()) ) @@ -5667,9 +5667,9 @@ void handle_force_delete(void*) LLSelectMgr::getInstance()->selectForceDelete(); } -class LLViewEnableJoystickFlycam : public view_listener_t +class LLViewEnableJoystickFlycam final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = (gSavedSettings.getBOOL("JoystickEnabled") && gSavedSettings.getBOOL("JoystickFlycamEnabled")); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -5677,9 +5677,9 @@ class LLViewEnableJoystickFlycam : public view_listener_t } }; -class LLViewEnableLastChatter : public view_listener_t +class LLViewEnableLastChatter final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // *TODO: add check that last chatter is in range bool new_value = (gAgentCamera.cameraThirdPerson() && gAgent.getLastChatter().notNull()); @@ -5688,9 +5688,9 @@ class LLViewEnableLastChatter : public view_listener_t } }; -class LLEditEnableDeselect : public view_listener_t +class LLEditEnableDeselect final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canDeselect(); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -5698,9 +5698,9 @@ class LLEditEnableDeselect : public view_listener_t } }; -class LLEditDeselect : public view_listener_t +class LLEditDeselect final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { if( LLEditMenuHandler::gEditMenuHandler ) { @@ -5710,9 +5710,9 @@ class LLEditDeselect : public view_listener_t } }; -class LLEditEnableSelectAll : public view_listener_t +class LLEditEnableSelectAll final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canSelectAll(); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -5721,9 +5721,9 @@ class LLEditEnableSelectAll : public view_listener_t }; -class LLEditSelectAll : public view_listener_t +class LLEditSelectAll final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { if( LLEditMenuHandler::gEditMenuHandler ) { @@ -5734,9 +5734,9 @@ class LLEditSelectAll : public view_listener_t }; -class LLEditEnableUndo : public view_listener_t +class LLEditEnableUndo final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canUndo(); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -5744,9 +5744,9 @@ class LLEditEnableUndo : public view_listener_t } }; -class LLEditUndo : public view_listener_t +class LLEditUndo final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { if( LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canUndo() ) { @@ -5756,9 +5756,9 @@ class LLEditUndo : public view_listener_t } }; -class LLEditEnableRedo : public view_listener_t +class LLEditEnableRedo final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canRedo(); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -5766,9 +5766,9 @@ class LLEditEnableRedo : public view_listener_t } }; -class LLEditRedo : public view_listener_t +class LLEditRedo final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { if( LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canRedo() ) { @@ -5895,9 +5895,9 @@ void handle_reload_settings(void*) gColors.loadFromFileLegacy(color_file, FALSE, TYPE_COL4U); } -class LLWorldSetHomeLocation : public view_listener_t +class LLWorldSetHomeLocation final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // we just send the message and let the server check for failure cases // server will echo back a "Home position set." alert if it succeeds @@ -5907,9 +5907,9 @@ class LLWorldSetHomeLocation : public view_listener_t } }; -class LLWorldTeleportHome : public view_listener_t +class LLWorldTeleportHome final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gAgent.teleportHome(); return true; @@ -5922,27 +5922,27 @@ void toggle_sit() gAgent.setControlFlags(gAgentAvatarp->isSitting() ? AGENT_CONTROL_STAND_UP : AGENT_CONTROL_SIT_ON_GROUND); } -class LLWorldSitOnGround : public view_listener_t +class LLWorldSitOnGround final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { toggle_sit(); return true; } }; -class LLWorldFakeAway : public view_listener_t +class LLWorldFakeAway final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_fake_away_status(nullptr); return true; } }; -class LLWorldEnableSitOnGround : public view_listener_t +class LLWorldEnableSitOnGround final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = (gAgentAvatarp); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -5950,9 +5950,9 @@ class LLWorldEnableSitOnGround : public view_listener_t } }; -class LLWorldSetAway : public view_listener_t +class LLWorldSetAway final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { if (gAgent.getAFK()) { @@ -5966,9 +5966,9 @@ class LLWorldSetAway : public view_listener_t } }; -class LLWorldSetBusy : public view_listener_t +class LLWorldSetBusy final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool busy = !gAgent.isDoNotDisturb(); gAgent.setDoNotDisturb(busy); @@ -5978,9 +5978,9 @@ class LLWorldSetBusy : public view_listener_t } }; -class LLWorldCreateLandmark : public view_listener_t +class LLWorldCreateLandmark final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.4.5) | Added: RLVa-1.0.0 if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) @@ -6022,9 +6022,9 @@ class LLWorldCreateLandmark : public view_listener_t } }; -class LLToolsLookAtSelection : public view_listener_t +class LLToolsLookAtSelection final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_look_at_selection(userdata); return true; @@ -6069,9 +6069,9 @@ void handle_look_at_selection(const LLSD& param) } } -class LLAvatarInviteToGroup : public view_listener_t +class LLAvatarInviteToGroup final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); // if(avatar) @@ -6085,9 +6085,9 @@ class LLAvatarInviteToGroup : public view_listener_t } }; -class LLAvatarAddFriend : public view_listener_t +class LLAvatarAddFriend final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); // if(avatar && !LLAvatarActions::isFriend(avatar->getID())) @@ -6101,9 +6101,9 @@ class LLAvatarAddFriend : public view_listener_t } }; -class LLAvatarResetSkeleton: public view_listener_t +class LLAvatarResetSkeleton final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()); if (avatar) @@ -6114,9 +6114,9 @@ class LLAvatarResetSkeleton: public view_listener_t } }; -class LLAvatarEnableResetSkeleton: public view_listener_t +class LLAvatarEnableResetSkeleton final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()); return avatar != nullptr; @@ -6124,9 +6124,9 @@ class LLAvatarEnableResetSkeleton: public view_listener_t }; -class LLAvatarResetSkeletonAndAnimations : public view_listener_t +class LLAvatarResetSkeletonAndAnimations final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()); if (avatar) @@ -6188,9 +6188,9 @@ void handle_give_money_dialog(LLViewerObject* obj) } } -class LLPayObject : public view_listener_t +class LLPayObject final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_give_money_dialog(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()); return true; @@ -6267,9 +6267,9 @@ bool enable_object_sit(/*LLUICtrl* ctrl*/) return !sitting_on_sel && is_object_sittable(); } -class LLObjectEnableSitOrStand : public view_listener_t +class LLObjectEnableSitOrStand final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value; @@ -6310,9 +6310,9 @@ class LLObjectEnableSitOrStand : public view_listener_t } }; -class LLEnablePayObject : public view_listener_t +class LLEnablePayObject final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(enable_pay_avatar() || enable_pay_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject())); return true; @@ -6352,9 +6352,9 @@ void handle_viewer_disable_message_log(void*) // TomY TODO: Move! void show_floater(const std::string& floater_name); -class LLShowFloater : public view_listener_t +class LLShowFloater final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { show_floater(userdata.asString()); return true; @@ -6362,9 +6362,9 @@ class LLShowFloater : public view_listener_t }; bool floater_visible(const std::string& floater_name); -class LLFloaterVisible : public view_listener_t +class LLFloaterVisible final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(floater_visible(userdata["data"].asString())); return true; @@ -6382,9 +6382,9 @@ bool callback_show_url(const LLSD& notification, const LLSD& response) return false; } -class LLPromptShowURL : public view_listener_t +class LLPromptShowURL final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { std::string param = userdata.asString(); std::string::size_type offset = param.find(","); @@ -6422,9 +6422,9 @@ bool callback_show_file(const LLSD& notification, const LLSD& response) return false; } -class LLPromptShowFile : public view_listener_t +class LLPromptShowFile final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { std::string param = userdata.asString(); std::string::size_type offset = param.find(","); @@ -6445,9 +6445,9 @@ class LLPromptShowFile : public view_listener_t } }; -class LLShowAgentProfile : public view_listener_t +class LLShowAgentProfile final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLUUID agent_id; if (userdata.asString() == "agent") @@ -6479,9 +6479,9 @@ class LLShowAgentProfile : public view_listener_t } }; -class LLLandEdit : public view_listener_t +class LLLandEdit final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0b) if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) ) @@ -6516,9 +6516,9 @@ class LLLandEdit : public view_listener_t } }; -class LLWorldEnableBuyLand : public view_listener_t +class LLWorldEnableBuyLand final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLViewerParcelMgr::getInstance()->canAgentBuyParcel( LLViewerParcelMgr::getInstance()->selectionEmpty() @@ -6536,9 +6536,9 @@ BOOL enable_buy_land(void*) LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel(), false); } -class LLWorldVisibleDestinations : public view_listener_t +class LLWorldVisibleDestinations final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool visible(!LFSimFeatureHandler::instance().destinationGuideURL().empty()); gMenuHolder->findControl(userdata["control"].asString())->setValue(visible); @@ -6546,14 +6546,14 @@ class LLWorldVisibleDestinations : public view_listener_t } }; -class LLObjectAttachToAvatar : public view_listener_t +class LLObjectAttachToAvatar final : public view_listener_t { public: LLObjectAttachToAvatar(bool replace) : mReplace(replace) {} static void setObjectSelection(LLObjectSelectionHandle selection) { sObjectSelection = selection; } private: - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { setObjectSelection(LLSelectMgr::getInstance()->getSelection()); LLViewerObject* selectedObject = sObjectSelection->getFirstRootObject(); @@ -6716,9 +6716,9 @@ void callback_attachment_drop(const LLSD& notification, const LLSD& response) return; } -class LLAttachmentDrop : public view_listener_t +class LLAttachmentDrop final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // [RLVa:KB] - Checked: 2010-03-15 (RLVa-1.2.0e) | Modified: RLVa-1.0.5 if (rlv_handler_t::isEnabled()) @@ -6833,9 +6833,9 @@ void detach_label(std::string& label, void* user_data) } } -class LLAttachmentDetach : public view_listener_t +class LLAttachmentDetach final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // Called when the user clicked on an object attached to them // and selected "Detach". @@ -6888,7 +6888,7 @@ class LLAttachmentDetach : public view_listener_t //Adding an observer for a Jira 2422 and needs to be a fetch observer //for Jira 3119 -class LLWornItemFetchedObserver : public LLInventoryFetchItemsObserver +class LLWornItemFetchedObserver final : public LLInventoryFetchItemsObserver { public: LLWornItemFetchedObserver(const LLUUID& worn_item_id) : @@ -6906,9 +6906,9 @@ protected: }; // You can only drop items on parcels where you can build. -class LLAttachmentEnableDrop : public view_listener_t +class LLAttachmentEnableDrop final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { BOOL can_build = gAgent.isGodlike() || (LLViewerParcelMgr::getInstance()->allowAgentBuild()); @@ -7005,9 +7005,9 @@ BOOL enable_detach(const LLSD&) return FALSE; } -class LLAttachmentEnableDetach : public view_listener_t +class LLAttachmentEnableDetach final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = enable_detach(); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -7096,9 +7096,9 @@ BOOL object_is_wearable() // Also for seeing if object can be attached. See above. -class LLObjectEnableWear : public view_listener_t +class LLObjectEnableWear final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool is_wearable = object_selected_and_point_valid(nullptr); gMenuHolder->findControl(userdata["control"].asString())->setValue(is_wearable); @@ -7120,9 +7120,9 @@ BOOL object_attached(void *user_data) // return attachment->getNumObjects() > 0; } -class LLAvatarSendIM : public view_listener_t +class LLAvatarSendIM final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); // if(avatar) @@ -7198,9 +7198,9 @@ void queue_actions(LLFloaterScriptQueue* q, const std::string& msg) } } -class LLToolsSelectedScriptAction : public view_listener_t +class LLToolsSelectedScriptAction final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // [RLVa:KB] - Checked: 2010-04-19 (RLVa-1.2.0f) | Modified: RLVa-1.0.5a // We'll allow resetting the scripts of objects on a non-attachable attach point since they wouldn't be able to circumvent anything @@ -7423,9 +7423,9 @@ void menu_toggle_double_click_control(void* user_data) // these are used in the gl menus to set control values, generically. -class LLToggleControl : public view_listener_t +class LLToggleControl final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLControlVariable* control(gSavedSettings.getControl(userdata.asString())); control->set(!control->get()); @@ -7433,9 +7433,9 @@ class LLToggleControl : public view_listener_t } }; -class LLTogglePerAccountControl : public view_listener_t +class LLTogglePerAccountControl final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLControlVariable* control(gSavedPerAccountSettings.getControl(userdata.asString())); control->set(!control->get()); @@ -7478,9 +7478,9 @@ void menu_toggle_attached_particles(void* user_data) LLPipeline::sRenderAttachedParticles = gSavedSettings.getBOOL("RenderAttachedParticles"); } -class LLSomethingSelected : public view_listener_t +class LLSomethingSelected final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = !(LLSelectMgr::getInstance()->getSelection()->isEmpty()); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -7488,9 +7488,9 @@ class LLSomethingSelected : public view_listener_t } }; -class LLSomethingSelectedNoHUD : public view_listener_t +class LLSomethingSelectedNoHUD final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); bool new_value = !(selection->isEmpty()) && !(selection->getSelectType() == SELECT_TYPE_HUD); @@ -7525,18 +7525,18 @@ static bool is_editable_selected() return (LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject() != nullptr); } -class LLEditableSelected : public view_listener_t +class LLEditableSelected final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(is_editable_selected()); return true; } }; -class LLEditableSelectedMono : public view_listener_t +class LLEditableSelectedMono final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerRegion* region = gAgent.getRegion(); if(region && gMenuHolder && gMenuHolder->findControl(userdata["control"].asString())) @@ -7550,9 +7550,9 @@ class LLEditableSelectedMono : public view_listener_t } }; -class LLToolsEnableTakeCopy : public view_listener_t +class LLToolsEnableTakeCopy final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(enable_object_take_copy()); return true; @@ -7573,9 +7573,9 @@ bool enable_object_take_copy() || !gAgent.isGodlike()) # endif { - struct f : public LLSelectedObjectFunctor + struct f final : public LLSelectedObjectFunctor { - virtual bool apply(LLViewerObject* obj) + bool apply(LLViewerObject* obj) override { // return (!obj->permCopy() || obj->isAttachment()); // [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-1.0.0g @@ -7596,17 +7596,17 @@ bool enable_object_take_copy() } // -class LLToolsEnableAdminDelete : public view_listener_t +class LLToolsEnableAdminDelete final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); return (object != nullptr); } }; -class LLToolsAdminDelete : public view_listener_t +class LLToolsAdminDelete final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLSelectMgr::getInstance()->selectForceDelete(); return true; @@ -7618,9 +7618,9 @@ BOOL enable_selection_you_own_all(void*) { if (LLSelectMgr::getInstance()) { - struct f : public LLSelectedObjectFunctor + struct f final : public LLSelectedObjectFunctor { - virtual bool apply(LLViewerObject* obj) + bool apply(LLViewerObject* obj) override { return (!obj->permYouOwner()); } @@ -7639,9 +7639,9 @@ BOOL enable_selection_you_own_one(void*) { if (LLSelectMgr::getInstance()) { - struct f : public LLSelectedObjectFunctor + struct f final : public LLSelectedObjectFunctor { - virtual bool apply(LLViewerObject* obj) + virtual bool apply(LLViewerObject* obj) override { return (obj->permYouOwner()); } @@ -7656,7 +7656,7 @@ BOOL enable_selection_you_own_one(void*) return TRUE; } -class LLHasAsset : public LLInventoryCollectFunctor +class LLHasAsset final : public LLInventoryCollectFunctor { public: LLHasAsset(const LLUUID& id) : mAssetID(id), mHasAsset(FALSE) {} @@ -7731,9 +7731,9 @@ BOOL enable_save_into_task_inventory(void*) return FALSE; } -class LLToolsEnableSaveToObjectInventory : public view_listener_t +class LLToolsEnableSaveToObjectInventory final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = enable_save_into_task_inventory(nullptr); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -7742,9 +7742,9 @@ class LLToolsEnableSaveToObjectInventory : public view_listener_t }; -class LLViewEnableMouselook : public view_listener_t +class LLViewEnableMouselook final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // You can't go directly from customize avatar to mouselook. // TODO: write code with appropriate dialogs to handle this transition. @@ -7754,9 +7754,9 @@ class LLViewEnableMouselook : public view_listener_t } }; -class LLToolsEnableToolNotPie : public view_listener_t +class LLToolsEnableToolNotPie final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = ( LLToolMgr::getInstance()->getBaseTool() != LLToolPie::getInstance() ); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -7764,9 +7764,9 @@ class LLToolsEnableToolNotPie : public view_listener_t } }; -class LLWorldEnableCreateLandmark : public view_listener_t +class LLWorldEnableCreateLandmark final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = gAgent.isGodlike() || (gAgent.getRegion() && gAgent.getRegion()->getAllowLandmark()); @@ -7778,9 +7778,9 @@ class LLWorldEnableCreateLandmark : public view_listener_t } }; -class LLWorldEnableSetHomeLocation : public view_listener_t +class LLWorldEnableSetHomeLocation final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = gAgent.isGodlike() || (gAgent.getRegion() && gAgent.getRegion()->getAllowSetHome()); @@ -7789,9 +7789,9 @@ class LLWorldEnableSetHomeLocation : public view_listener_t } }; -class LLWorldEnableTeleportHome : public view_listener_t +class LLWorldEnableTeleportHome final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerRegion* regionp = gAgent.getRegion(); bool agent_on_prelude = (regionp && regionp->isPrelude()); @@ -7836,9 +7836,9 @@ BOOL check_show_xui_names(void *) return gSavedSettings.getBOOL("ShowXUINames"); } -class LLToolsSelectOnlyMyObjects : public view_listener_t +class LLToolsSelectOnlyMyObjects final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { BOOL cur_val = gSavedSettings.getBOOL("SelectOwnedOnly"); @@ -7848,9 +7848,9 @@ class LLToolsSelectOnlyMyObjects : public view_listener_t } }; -class LLToolsSelectOnlyMovableObjects : public view_listener_t +class LLToolsSelectOnlyMovableObjects final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { BOOL cur_val = gSavedSettings.getBOOL("SelectMovableOnly"); @@ -7860,9 +7860,9 @@ class LLToolsSelectOnlyMovableObjects : public view_listener_t } }; -class LLToolsSelectBySurrounding : public view_listener_t +class LLToolsSelectBySurrounding final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLSelectMgr::sRectSelectInclusive = !LLSelectMgr::sRectSelectInclusive; @@ -7871,9 +7871,9 @@ class LLToolsSelectBySurrounding : public view_listener_t } }; -class LLToolsShowSelectionHighlights : public view_listener_t +class LLToolsShowSelectionHighlights final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLControlVariable *ctrl = gSavedSettings.getControl("RenderHighlightSelections"); ctrl->setValue(!ctrl->getValue().asBoolean()); @@ -7881,9 +7881,9 @@ class LLToolsShowSelectionHighlights : public view_listener_t } }; -class LLToolsShowHiddenSelection : public view_listener_t +class LLToolsShowHiddenSelection final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // TomY TODO Merge these LLSelectMgr::sRenderHiddenSelections = !LLSelectMgr::sRenderHiddenSelections; @@ -7893,9 +7893,9 @@ class LLToolsShowHiddenSelection : public view_listener_t } }; -class LLToolsShowSelectionLightRadius : public view_listener_t +class LLToolsShowSelectionLightRadius final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // TomY TODO merge these LLSelectMgr::sRenderLightRadius = !LLSelectMgr::sRenderLightRadius; @@ -7905,9 +7905,9 @@ class LLToolsShowSelectionLightRadius : public view_listener_t } }; -class LLToolsEditLinkedParts : public view_listener_t +class LLToolsEditLinkedParts final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { BOOL select_individuals = gSavedSettings.getBOOL("EditLinkedParts"); if (select_individuals) @@ -8432,14 +8432,14 @@ void force_error_driver_crash(void *) LLAppViewer::instance()->forceErrorDriverCrash(); } -class LLToolsUseSelectionForGrid : public view_listener_t +class LLToolsUseSelectionForGrid final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLSelectMgr::getInstance()->clearGridObjects(); - struct f : public LLSelectedObjectFunctor + struct f final : public LLSelectedObjectFunctor { - virtual bool apply(LLViewerObject* objectp) + bool apply(LLViewerObject* objectp) override { LLSelectMgr::getInstance()->addGridObject(objectp); return true; @@ -8613,18 +8613,18 @@ BOOL get_visibility(void* user_data) } // TomY TODO: Get rid of these? -class LLViewShowHoverTips : public view_listener_t +class LLViewShowHoverTips final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLHoverView::sShowHoverTips = !LLHoverView::sShowHoverTips; return true; } }; -class LLViewCheckShowHoverTips : public view_listener_t +class LLViewCheckShowHoverTips final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLHoverView::sShowHoverTips; gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -8633,9 +8633,9 @@ class LLViewCheckShowHoverTips : public view_listener_t }; // TomY TODO: Get rid of these? -class LLViewHighlightTransparent : public view_listener_t +class LLViewHighlightTransparent final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-1.0.0b | OK if ( (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) && (!LLDrawPoolAlpha::sShowDebugAlpha)) @@ -8647,9 +8647,9 @@ class LLViewHighlightTransparent : public view_listener_t } }; -class LLViewCheckHighlightTransparent : public view_listener_t +class LLViewCheckHighlightTransparent final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLDrawPoolAlpha::sShowDebugAlpha; gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -8657,9 +8657,9 @@ class LLViewCheckHighlightTransparent : public view_listener_t } }; -class LLViewToggleRenderType : public view_listener_t +class LLViewToggleRenderType final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { std::string type = userdata.asString(); if (type == "hideparticles") @@ -8670,9 +8670,9 @@ class LLViewToggleRenderType : public view_listener_t } }; -class LLViewCheckRenderType : public view_listener_t +class LLViewCheckRenderType final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { std::string type = userdata["data"].asString(); bool new_value = false; @@ -8685,9 +8685,9 @@ class LLViewCheckRenderType : public view_listener_t } }; -class LLViewShowHUDAttachments : public view_listener_t +class LLViewShowHUDAttachments final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // [RLVa:KB] - Checked: 2010-04-19 (RLVa-1.2.1a) | Modified: RLVa-1.0.0c if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedHUD()) && (LLPipeline::sShowHUDAttachments) ) @@ -8699,9 +8699,9 @@ class LLViewShowHUDAttachments : public view_listener_t } }; -class LLViewCheckHUDAttachments : public view_listener_t +class LLViewCheckHUDAttachments final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLPipeline::sShowHUDAttachments; gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -8709,9 +8709,9 @@ class LLViewCheckHUDAttachments : public view_listener_t } }; -class LLEditEnableTakeOff : public view_listener_t +class LLEditEnableTakeOff final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = false; std::string control_name = userdata["control"].asString(); @@ -8731,9 +8731,9 @@ class LLEditEnableTakeOff : public view_listener_t } }; -class LLEditTakeOff : public view_listener_t +class LLEditTakeOff final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { std::string clothing = userdata.asString(); if (clothing == "all") @@ -8771,9 +8771,9 @@ class LLEditTakeOff : public view_listener_t } }; -class LLToolsSelectTool : public view_listener_t +class LLToolsSelectTool final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { std::string tool_name = userdata.asString(); if (tool_name == "focus") @@ -8801,9 +8801,9 @@ class LLToolsSelectTool : public view_listener_t }; /// WINDLIGHT callbacks -class LLWorldEnvSettings : public view_listener_t +class LLWorldEnvSettings final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // [RLVa:KB] - Checked: 2010-03-18 (RLVa-1.2.0a) | Modified: RLVa-1.0.0g if (gRlvHandler.hasBehaviour(RLV_BHVR_SETENV)) @@ -8837,9 +8837,9 @@ class LLWorldEnvSettings : public view_listener_t } }; -class LLWorldEnableEnvSettings : public view_listener_t +class LLWorldEnableEnvSettings final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool result = false; std::string tod = userdata.asString(); @@ -8876,26 +8876,26 @@ class LLWorldEnableEnvSettings : public view_listener_t } }; -class SinguCloseAllDialogs : public view_listener_t +class SinguCloseAllDialogs final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gNotifyBoxView->deleteAllChildren(); return true; } }; -class SinguEnableStreamingAudioDisplay : public view_listener_t +class SinguEnableStreamingAudioDisplay final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { return handle_ticker_enabled(nullptr); } }; -class SinguPoseStand : public view_listener_t +class SinguPoseStand final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { if (current_pose.isNull()) set_current_pose("038fcec9-5ebd-8a8e-0e2e-6e71a0a1ac53"); @@ -8905,27 +8905,27 @@ class SinguPoseStand : public view_listener_t } }; -class SinguCheckPoseStand : public view_listener_t +class SinguCheckPoseStand final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(handle_check_pose(nullptr)); return true; } }; -class SinguRebake : public view_listener_t +class SinguRebake final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_rebake_textures(nullptr); return true; } }; -class SinguVisibleDebugConsole : public view_listener_t +class SinguVisibleDebugConsole final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerRegion* region = gAgent.getRegion(); gMenuHolder->findControl(userdata["control"].asString())->setValue(region && !(region->getCapability("SimConsoleAsync").empty() || region->getCapability("SimConsole").empty())); @@ -8933,9 +8933,9 @@ class SinguVisibleDebugConsole : public view_listener_t } }; -class SinguUrlAction : public view_listener_t +class SinguUrlAction final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLUrlAction::clickAction(userdata.asStringRef(), true); return true; @@ -8952,54 +8952,54 @@ static void visible_inv_floater(const LLSD& userdata, const std::string& field) gMenuHolder->findControl(userdata["control"].asString())->setValue(!!LFFloaterInvPanel::getInstance(LLSD().with(field, userdata["data"]))); } -class ShowInvFloaterID : public view_listener_t +class ShowInvFloaterID final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { show_inv_floater(userdata, "id"); return true; } }; -class VisibleInvFloaterID : public view_listener_t +class VisibleInvFloaterID final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { visible_inv_floater(userdata, "id"); return true; } }; -class ShowInvFloaterName : public view_listener_t +class ShowInvFloaterName final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { show_inv_floater(userdata, "name"); return true; } }; -class VisibleInvFloaterName : public view_listener_t +class VisibleInvFloaterName final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { visible_inv_floater(userdata, "name"); return true; } }; -class ShowInvFloaterType : public view_listener_t +class ShowInvFloaterType final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { show_inv_floater(userdata, "type"); return true; } }; -class VisibleInvFloaterType : public view_listener_t +class VisibleInvFloaterType final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { visible_inv_floater(userdata, "type"); return true; @@ -9028,27 +9028,27 @@ void show_web_floater(const std::string& type) LLFloaterWebContent::showInstance(type, p); } -class ShowWebFloater : public view_listener_t +class ShowWebFloater final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { show_web_floater(userdata.asStringRef()); return true; } }; -class VisibleSecondLife : public view_listener_t +class VisibleSecondLife final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(gHippoGridManager->getCurrentGrid()->isSecondLife()); return true; } }; -class VisibleNotSecondLife : public view_listener_t +class VisibleNotSecondLife final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(!gHippoGridManager->getConnectedGrid()->isSecondLife()); return true; @@ -9158,63 +9158,63 @@ void copy_profile_uri(const LLUUID& id, const LFIDBearer::Type& type) gViewerWindow->getWindow()->copyTextToClipboard(get_wslurl_for(id, type)); } -class ListEnableAnySelected : public view_listener_t +class ListEnableAnySelected final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(LFIDBearer::getActiveNumSelected() != 0); return true; } }; -class ListEnableMultipleSelected : public view_listener_t +class ListEnableMultipleSelected final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(LFIDBearer::getActiveNumSelected() > 1); return true; } }; -class ListEnableSingleSelected : public view_listener_t +class ListEnableSingleSelected final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(LFIDBearer::getActiveNumSelected() == 1); return true; } }; -class ListEnableCall : public view_listener_t +class ListEnableCall final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(LLAvatarActions::canCall()); return true; } }; -class ListEnableIsFriend : public view_listener_t +class ListEnableIsFriend final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(LLAvatarActions::isFriend(LFIDBearer::getActiveSelectedID())); return true; } }; -class ListEnableIsNotFriend : public view_listener_t +class ListEnableIsNotFriend final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(!LLAvatarActions::isFriend(LFIDBearer::getActiveSelectedID())); return true; } }; -class ListEnableUnmute : public view_listener_t +class ListEnableUnmute final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool are_blocked = false; for (const auto& id : LFIDBearer::getActiveSelectedIDs()) @@ -9226,9 +9226,9 @@ class ListEnableUnmute : public view_listener_t } }; -class ListEnableMute : public view_listener_t +class ListEnableMute final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool blockable = false; for (const auto& id : LFIDBearer::getActiveSelectedIDs()) @@ -9249,18 +9249,18 @@ class ListEnableMute : public view_listener_t } }; -class ListEnableOfferTeleport : public view_listener_t +class ListEnableOfferTeleport final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(LLAvatarActions::canOfferTeleport(LFIDBearer::getActiveSelectedIDs())); return true; } }; -class ListVisibleWebProfile : public view_listener_t +class ListVisibleWebProfile final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(LFIDBearer::getActiveNumSelected() && !(gSavedSettings.getBOOL("UseWebProfiles") || gSavedSettings.getString("WebProfileURL").empty())); return true; @@ -9268,9 +9268,9 @@ class ListVisibleWebProfile : public view_listener_t }; void ban_from_group(const uuid_vec_t& ids); -class ListBanFromGroup : public view_listener_t +class ListBanFromGroup final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { ban_from_group(LFIDBearer::getActiveSelectedIDs()); return true; @@ -9279,7 +9279,23 @@ class ListBanFromGroup : public view_listener_t void copy_from_ids(const uuid_vec_t & ids, std::function func); -class ListCopyNames : public view_listener_t +uuid_vec_t get_active_owner_ids() +{ + uuid_vec_t ret; + for (const auto& id : LFIDBearer::getActiveSelectedIDs()) + { + const auto& owner_id = get_obj_owner(id); + if (owner_id.notNull()) ret.push_back(owner_id); + } + return ret; +} + +const LLUUID& get_active_owner_id() +{ + return get_obj_owner(LFIDBearer::getActiveSelectedID()); +} + +class ListCopyNames final : public view_listener_t { static std::string getGroupName(const LLUUID& id) { @@ -9306,95 +9322,104 @@ class ListCopyNames : public view_listener_t return LLExperienceCache::instance().get(id)[LLExperienceCache::NAME]; } - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLWString str; const auto& type = LFIDBearer::getActiveType(); - copy_from_ids(LFIDBearer::getActiveSelectedIDs(), type == LFIDBearer::GROUP ? getGroupName : - type == LFIDBearer::OBJECT ? getObjectName : + bool owner = !userdata.asBoolean(); + copy_from_ids(owner ? get_active_owner_ids() : LFIDBearer::getActiveSelectedIDs(), type == LFIDBearer::GROUP ? getGroupName : + type == LFIDBearer::OBJECT ? owner ? getAvatarName : getObjectName : type == LFIDBearer::EXPERIENCE ? getExperienceName : getAvatarName); if (!str.empty()) LLView::getWindow()->copyTextToClipboard(str); return true; } }; -class ListCopySLURL : public view_listener_t +class ListCopySLURL final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { - copy_profile_uri(LFIDBearer::getActiveSelectedID(), LFIDBearer::getActiveType()); + bool owner = !userdata.asBoolean(); + copy_profile_uri(owner ? get_active_owner_id() : LFIDBearer::getActiveSelectedID(), owner ? LFIDBearer::AVATAR : LFIDBearer::getActiveType()); return true; } }; -class ListCopyUUIDs : public view_listener_t +const LLUUID& active_owner_or_id(const LLSD& userdata) { - bool handleEvent(LLPointer event, const LLSD& userdata) + return !userdata.asBoolean() ? get_active_owner_id() : LFIDBearer::getActiveSelectedID(); +} + +#define active_owners_or_ids(userdata) !userdata.asBoolean() ? get_active_owner_ids() : LFIDBearer::getActiveSelectedIDs() + +class ListCopyUUIDs final : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) override { - LLAvatarActions::copyUUIDs(LFIDBearer::getActiveSelectedIDs()); + LLAvatarActions::copyUUIDs(active_owners_or_ids(userdata)); return true; } }; -class ListInviteToGroup : public view_listener_t +class ListInviteToGroup final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { - LLAvatarActions::inviteToGroup(LFIDBearer::getActiveSelectedIDs()); + LLAvatarActions::inviteToGroup(active_owners_or_ids(userdata)); return true; } }; -class ListOfferTeleport : public view_listener_t +class ListOfferTeleport final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { - LLAvatarActions::offerTeleport(LFIDBearer::getActiveSelectedIDs()); + LLAvatarActions::offerTeleport(active_owners_or_ids(userdata)); return true; } }; -class ListPay : public view_listener_t +class ListPay final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { - LLAvatarActions::pay(LFIDBearer::getActiveSelectedID()); + LLAvatarActions::pay(active_owner_or_id(userdata)); return true; } }; -class ListRemoveFriend : public view_listener_t +class ListRemoveFriend final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { - LLAvatarActions::removeFriendDialog(LFIDBearer::getActiveSelectedID()); + LLAvatarActions::removeFriendDialog(active_owner_or_id(userdata)); return true; } }; -class ListRequestFriendship : public view_listener_t +class ListRequestFriendship final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { - LLAvatarActions::requestFriendshipDialog(LFIDBearer::getActiveSelectedID()); + LLAvatarActions::requestFriendshipDialog(active_owner_or_id(userdata)); return true; } }; -class ListRequestTeleport : public view_listener_t +class ListRequestTeleport final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { - LLAvatarActions::teleportRequest(LFIDBearer::getActiveSelectedID()); + LLAvatarActions::teleportRequest(active_owner_or_id(userdata)); return true; } }; -class ListShare : public view_listener_t +class ListShare final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { - LLAvatarActions::share(LFIDBearer::getActiveSelectedID()); + LLAvatarActions::share(active_owner_or_id(userdata)); return true; } }; @@ -9405,25 +9430,31 @@ bool can_show_web_profile() } void show_log_browser(const LLUUID& id, const LFIDBearer::Type& type); -class ListShowLog : public view_listener_t +class ListShowLog final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { - for (const LLUUID& id : LFIDBearer::getActiveSelectedIDs()) - show_log_browser(id, LFIDBearer::getActiveType()); + const auto& type = userdata.asBoolean() ? LFIDBearer::getActiveType() : LFIDBearer::AVATAR; + for (const LLUUID& id : active_owners_or_ids(userdata)) + show_log_browser(id, type); return true; } }; -class ListShowProfile : public view_listener_t +class ListShowProfile final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { switch (LFIDBearer::getActiveType()) { case LFIDBearer::AVATAR: LLAvatarActions::showProfiles(LFIDBearer::getActiveSelectedIDs()); break; case LFIDBearer::GROUP: LLGroupActions::showProfiles(LFIDBearer::getActiveSelectedIDs()); break; - case LFIDBearer::OBJECT: for (const auto& id : LFIDBearer::getActiveSelectedIDs()) LLUrlAction::openURL(get_slurl_for(id, LFIDBearer::OBJECT)); break; + case LFIDBearer::OBJECT: + if (userdata.asBoolean()) + for (const auto& id : LFIDBearer::getActiveSelectedIDs()) LLUrlAction::openURL(get_slurl_for(id, LFIDBearer::OBJECT)); + else // Owners + LLAvatarActions::showProfiles(get_active_owner_ids()); + break; case LFIDBearer::EXPERIENCE: for (const auto& id : LFIDBearer::getActiveSelectedIDs()) LLFloaterExperienceProfile::showInstance(id); break; default: break; } @@ -9431,48 +9462,48 @@ class ListShowProfile : public view_listener_t } }; -class ListShowWebProfile : public view_listener_t +class ListShowWebProfile final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { - LLAvatarActions::showProfiles(LFIDBearer::getActiveSelectedIDs(), true); + LLAvatarActions::showProfiles(active_owners_or_ids(userdata), true); return true; } }; -class ListStartAdhocCall : public view_listener_t +class ListStartAdhocCall final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { - LLAvatarActions::startAdhocCall(LFIDBearer::getActiveSelectedIDs()); + LLAvatarActions::startAdhocCall(active_owners_or_ids(userdata)); return true; } }; -class ListStartCall : public view_listener_t +class ListStartCall final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { - (LFIDBearer::getActiveType() == LFIDBearer::GROUP ? LLGroupActions::startCall : LLAvatarActions::startCall)(LFIDBearer::getActiveSelectedID()); + (LFIDBearer::getActiveType() == LFIDBearer::GROUP ? LLGroupActions::startCall : LLAvatarActions::startCall)(active_owner_or_id(userdata)); return true; } }; -class ListStartConference : public view_listener_t +class ListStartConference final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { - LLAvatarActions::startConference(LFIDBearer::getActiveSelectedIDs()); + LLAvatarActions::startConference(active_owners_or_ids(userdata)); return true; } }; -class ListStartIM : public view_listener_t +class ListStartIM final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { const auto&& im = LFIDBearer::getActiveType() == LFIDBearer::GROUP ? [](const LLUUID& id) { LLGroupActions::startIM(id); } : LLAvatarActions::startIM; - for (const auto& id : LFIDBearer::getActiveSelectedIDs()) + for (const auto& id : active_owners_or_ids(userdata)) im(id); return true; } @@ -9485,53 +9516,53 @@ const LLVector3d get_obj_pos(const LLUUID& id) return obj->getPositionGlobal(); return LLVector3d::zero; } -static const LLVector3d get_active_pos() +static const LLVector3d get_active_pos(const LLSD& userdata) { - const auto& id = LFIDBearer::getActiveSelectedID(); - if (LFIDBearer::getActiveType() == LFIDBearer::OBJECT) + const auto& id = active_owner_or_id(userdata); + if (userdata.asBoolean() && LFIDBearer::getActiveType() == LFIDBearer::OBJECT) return get_obj_pos(id); return get_av_pos(id); } -class ListTeleportTo : public view_listener_t +class ListTeleportTo final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { - const auto& pos = get_active_pos(); + const auto& pos = get_active_pos(userdata); if (!pos.isExactlyZero()) gAgent.teleportViaLocation(pos); return true; } }; -class ListStalk : public view_listener_t +class ListStalk final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { - LLAvatarActions::showOnMap(LFIDBearer::getActiveSelectedID()); + LLAvatarActions::showOnMap(active_owner_or_id(userdata)); return true; } }; -class ListStalkable : public view_listener_t +class ListStalkable final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { BOOL is_agent_mappable(const LLUUID& agent_id); - const auto& ids = LFIDBearer::getActiveSelectedIDs(); + const auto& ids = active_owners_or_ids(userdata["data"]); gMenuHolder->findControl(userdata["control"].asString())->setValue(ids.size() == 1 && is_agent_mappable(ids[0])); return true; } }; -class ListAbuseReport : public view_listener_t +class ListAbuseReport final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { if (LFIDBearer::getActiveType() == LFIDBearer::EXPERIENCE) LLFloaterReporter::showFromExperience(LFIDBearer::getActiveSelectedID()); else - LLFloaterReporter::showFromObject(LFIDBearer::getActiveSelectedID()); + LLFloaterReporter::showFromObject(active_owner_or_id(userdata)); return true; } }; @@ -9544,18 +9575,18 @@ void set_experience_permission(const char* perm, const uuid_vec_t& ids) cache.setExperiencePermission(id, perm, boost::bind(LLFloaterExperienceProfile::experiencePermissionResults, id, _1)); } -class ListExperienceAllow : public view_listener_t +class ListExperienceAllow final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { set_experience_permission("Allow", LFIDBearer::getActiveSelectedIDs()); return true; } }; -class ListExperienceForget : public view_listener_t +class ListExperienceForget final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { if (!gAgent.getRegion()) return true; auto& cache = LLExperienceCache::instance(); @@ -9565,9 +9596,9 @@ class ListExperienceForget : public view_listener_t } }; -class ListExperienceBlock : public view_listener_t +class ListExperienceBlock final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { set_experience_permission("Block", LFIDBearer::getActiveSelectedIDs()); return true; @@ -9593,30 +9624,31 @@ void parcel_mod_notice_callback(const uuid_vec_t& ids, S32 choice, boost::functi } bool is_nearby(const LLUUID& id); -class ListIsNearby : public view_listener_t +class ListIsNearby final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { - const auto& id = LFIDBearer::getActiveSelectedID(); - gMenuHolder->findControl(userdata["control"].asString())->setValue(LFIDBearer::getActiveType() == LFIDBearer::OBJECT ? !!gObjectList.findObject(id) : is_nearby(id)); + const auto& data = userdata["data"]; + const auto& id = active_owner_or_id(data); + gMenuHolder->findControl(userdata["control"].asString())->setValue(!data.asBoolean() && LFIDBearer::getActiveType() == LFIDBearer::OBJECT ? !!gObjectList.findObject(id) : is_nearby(id)); return true; } }; -class ListFollow : public view_listener_t +class ListFollow final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { - gAgent.startFollowPilot(LFIDBearer::getActiveSelectedID(), true, gSavedSettings.getF32("SinguFollowDistance")); + gAgent.startFollowPilot(active_owner_or_id(userdata), true, gSavedSettings.getF32("SinguFollowDistance")); return true; } }; -class ListGoTo : public view_listener_t +class ListGoTo final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { - const auto& pos = get_active_pos(); + const auto& pos = get_active_pos(userdata); if (!pos.isExactlyZero()) handle_go_to(pos); return true; @@ -9624,11 +9656,11 @@ class ListGoTo : public view_listener_t }; void track_av(const LLUUID& id); -class ListTrack : public view_listener_t +class ListTrack final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { - track_av(LFIDBearer::getActiveSelectedID()); + track_av(active_owner_or_id(userdata)); return true; } }; @@ -9638,11 +9670,11 @@ void confirm_eject(const uuid_vec_t& ids) { LLNotificationsUtil::add("EjectAvatarFullname", create_args(ids, "AVATAR_NAME"), LLSD(), boost::bind(parcel_mod_notice_callback, ids, boost::bind(LLNotificationsUtil::getSelectedOption, _1, _2), send_eject)); } -class ListEject : public view_listener_t +class ListEject final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { - confirm_eject(LFIDBearer::getActiveSelectedIDs()); + confirm_eject(active_owners_or_ids(userdata)); return true; } }; @@ -9652,11 +9684,11 @@ void confirm_freeze(const uuid_vec_t& ids) { LLNotificationsUtil::add("FreezeAvatarFullname", create_args(ids, "AVATAR_NAME"), LLSD(), boost::bind(parcel_mod_notice_callback, ids, boost::bind(LLNotificationsUtil::getSelectedOption, _1, _2), send_freeze)); } -class ListFreeze : public view_listener_t +class ListFreeze final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { - confirm_freeze(LFIDBearer::getActiveSelectedIDs()); + confirm_freeze(active_owners_or_ids(userdata)); return true; } }; @@ -9691,11 +9723,11 @@ void confirm_estate_ban(const uuid_vec_t& ids) { LLNotificationsUtil::add("EstateBanUser", create_args(ids, "EVIL_USER"), LLSD(), boost::bind(estate_bulk_eject, ids, true, boost::bind(LLNotificationsUtil::getSelectedOption, _1, _2))); } -class ListEstateBan : public view_listener_t +class ListEstateBan final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { - confirm_estate_ban(LFIDBearer::getActiveSelectedIDs()); + confirm_estate_ban(active_owners_or_ids(userdata)); return true; } }; @@ -9704,28 +9736,28 @@ void confirm_estate_kick(const uuid_vec_t& ids) { LLNotificationsUtil::add("EstateKickUser", create_args(ids, "EVIL_USER"), LLSD(), boost::bind(estate_bulk_eject, ids, false, boost::bind(LLNotificationsUtil::getSelectedOption, _1, _2))); } -class ListEstateEject : public view_listener_t +class ListEstateEject final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { - confirm_estate_kick(LFIDBearer::getActiveSelectedIDs()); + confirm_estate_kick(active_owners_or_ids(userdata)); return true; } }; -class ListToggleMute : public view_listener_t +class ListToggleMute final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { - for (const auto& id : LFIDBearer::getActiveSelectedIDs()) + for (const auto& id : active_owners_or_ids(userdata)) LLAvatarActions::toggleBlock(id); return true; } }; -class ListIsInGroup : public view_listener_t +class ListIsInGroup final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { auto in_group = false; for (const auto& id : LFIDBearer::getActiveSelectedIDs()) @@ -9736,9 +9768,9 @@ class ListIsInGroup : public view_listener_t } }; -class ListNotInGroup : public view_listener_t +class ListNotInGroup final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { auto in_group = true; for (const auto& id : LFIDBearer::getActiveSelectedIDs()) @@ -9749,9 +9781,9 @@ class ListNotInGroup : public view_listener_t } }; -class ListLeave : public view_listener_t +class ListLeave final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { for (const auto& id : LFIDBearer::getActiveSelectedIDs()) LLGroupActions::leave(id); @@ -9759,9 +9791,9 @@ class ListLeave : public view_listener_t } }; -class ListJoin : public view_listener_t +class ListJoin final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { for (const auto& id : LFIDBearer::getActiveSelectedIDs()) LLGroupActions::join(id); @@ -9769,9 +9801,9 @@ class ListJoin : public view_listener_t } }; -class ListActivate : public view_listener_t +class ListActivate final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { for (const auto& id : LFIDBearer::getActiveSelectedIDs()) LLGroupActions::activate(id); @@ -9779,18 +9811,18 @@ class ListActivate : public view_listener_t } }; -class ListObjectCamTo : public view_listener_t +class ListObjectCamTo final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gAgentCamera.lookAtObject(LFIDBearer::getActiveSelectedID(), false); return true; } }; -class ListObjectSit : public view_listener_t +class ListObjectSit final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gAgent.stopAutoPilot(true); handle_object_sit(gObjectList.findObject(LFIDBearer::getActiveSelectedID())); @@ -9798,18 +9830,18 @@ class ListObjectSit : public view_listener_t } }; -class ListObjectPay : public view_listener_t +class ListObjectPay final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_give_money_dialog(gObjectList.findObject(LFIDBearer::getActiveSelectedID())); return true; } }; -class ListObjectEnablePay : public view_listener_t +class ListObjectEnablePay final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { const auto& ids = LFIDBearer::getActiveSelectedIDs(); gMenuHolder->findControl(userdata["control"].asString())->setValue(ids.size() == 1 && enable_pay_object(gObjectList.findObject(ids[0]))); @@ -9824,9 +9856,9 @@ void list_for_each_object(std::function func) func(obj); } -class ListObjectTouch : public view_listener_t +class ListObjectTouch final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { list_for_each_object([](LLViewerObject* obj) { if (enable_object_touch(obj)) handle_object_touch(obj); }); return true; @@ -9842,18 +9874,18 @@ bool list_has_valid_object(std::function func) } // One object must have touch sensor -class ListObjectEnableTouch : public view_listener_t +class ListObjectEnableTouch final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(list_has_valid_object([](LLViewerObject* obj){ return enable_object_touch(obj); })); return true; } }; -class ListObjectEdit : public view_listener_t +class ListObjectEdit final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { std::vector objs; auto func = rlv_handler_t::isEnabled() ? static_cast>([&objs](LLViewerObject* obj) { if (gRlvHandler.canEdit(obj)) objs.push_back(obj); }) : [&objs](LLViewerObject* obj) { if (obj) objs.push_back(obj); }; @@ -9878,9 +9910,9 @@ class ListObjectEdit : public view_listener_t } }; -class ListObjectCanEdit : public view_listener_t +class ListObjectCanEdit final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_selection = userdata["data"].asBoolean(); auto& selmgr = LLSelectMgr::instance(); @@ -9893,45 +9925,60 @@ class ListObjectCanEdit : public view_listener_t } }; -class MediaCtrlCopyURL : public view_listener_t +class ListObjectDerender final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override + { + const std::string& unknown = LLTrans::getString("land_type_unknown"); + for (const auto& id : LFIDBearer::getActiveSelectedIDs()) + { + const auto& obj_data = get_obj_data(id); // Needed for object name + add_object_to_blacklist(id, obj_data ? obj_data->name : unknown); + } + + return true; + } +}; + +class MediaCtrlCopyURL final : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) override { get_focused()->onCopyURL(); return true; } }; -class MediaCtrlWebInspector : public view_listener_t +class MediaCtrlWebInspector final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { get_focused()->onOpenWebInspector(); return true; } }; -class MediaCtrlViewSource : public view_listener_t +class MediaCtrlViewSource final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { get_focused()->onShowSource(); return true; } }; -struct MarketplaceViewSortAction : view_listener_t +struct MarketplaceViewSortAction final : view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLFloaterMarketplaceListings::findInstance()->mPanelListings->onViewSortMenuItemClicked(userdata); return true; } }; -struct MarketplaceViewSortCheckItem : view_listener_t +struct MarketplaceViewSortCheckItem final : view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString()) ->setValue(LLFloaterMarketplaceListings::findInstance()->mPanelListings->onViewSortMenuItemCheck(userdata["data"])); @@ -9948,12 +9995,12 @@ void addMenu(view_listener_t *menu, const std::string& name) void initialize_menus() { // A parameterized event handler used as ctrl-8/9/0 zoom controls below. - class LLZoomer : public view_listener_t + class LLZoomer final : public view_listener_t { public: // The "mult" parameter says whether "val" is a multiplier or used to set the value. LLZoomer(F32 val, bool mult=true) : mVal(val), mMult(mult) {} - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerCamera& inst(LLViewerCamera::instance()); F32 new_fov_rad = mMult ? inst.getDefaultFOV() * mVal : mVal; @@ -10295,6 +10342,7 @@ void initialize_menus() addMenu(new ListObjectEnableTouch, "List.Object.EnableTouch"); addMenu(new ListObjectEdit, "List.Object.Edit"); addMenu(new ListObjectCanEdit, "List.Object.CanEdit"); + addMenu(new ListObjectDerender, "List.Object.Derender"); addMenu(new ListExperienceAllow, "List.Experience.Allow"); addMenu(new ListExperienceForget, "List.Experience.Forget"); addMenu(new ListExperienceBlock, "List.Experience.Block"); @@ -10311,17 +10359,17 @@ void initialize_menus() addMenu(new MarketplaceViewSortAction, "Marketplace.ViewSort.Action"); addMenu(new MarketplaceViewSortCheckItem, "Marketplace.ViewSort.CheckItem"); - class LLViewBuildMode : public view_listener_t + class LLViewBuildMode final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLToolMgr::getInstance()->toggleBuildMode(); return true; } }; - class LLViewCheckBuildMode : public view_listener_t + class LLViewCheckBuildMode final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(LLToolMgr::getInstance()->inEdit()); return true; diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index c6f684685..1432e4df7 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -575,6 +575,7 @@ class LLFileTakeSnapshotToDisk : public view_listener_t bool handleEvent(LLPointer event, const LLSD& userdata) { LLPointer raw = new LLImageRaw; + raw->enableOverSize(); S32 width = gViewerWindow->getWindowDisplayWidth(); S32 height = gViewerWindow->getWindowDisplayHeight(); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index f0386bc53..76a707bec 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2241,6 +2241,8 @@ void process_chat_from_simulator(LLMessageSystem* msg, void** user_data) // Object owner for objects msg->getUUID("ChatData", "OwnerID", owner_id); + bool has_owner = owner_id.notNull(); + if (chatter && has_owner) chatter->mOwnerID = owner_id; // Singu Note: Try to get Owner whenever possible msg->getU8Fast(_PREHASH_ChatData, _PREHASH_SourceType, source_temp); chat.mSourceType = (EChatSourceType)source_temp; @@ -2251,8 +2253,8 @@ void process_chat_from_simulator(LLMessageSystem* msg, void** user_data) // NaCL - Antispam Registry auto antispam = NACLAntiSpamRegistry::getIfExists(); if (antispam && chat.mChatType != CHAT_TYPE_START && chat.mChatType != CHAT_TYPE_STOP //Chat type isn't typing - && (antispam->checkQueue(NACLAntiSpamRegistry::QUEUE_CHAT, from_id, owner_id.isNull() ? LFIDBearer::AVATAR : LFIDBearer::OBJECT) // Spam from an object or avatar? - || (owner_id.notNull() && (antispam->checkQueue(NACLAntiSpamRegistry::QUEUE_CHAT, owner_id))))) // Spam from a resident? + && (antispam->checkQueue(NACLAntiSpamRegistry::QUEUE_CHAT, from_id, !has_owner ? LFIDBearer::AVATAR : LFIDBearer::OBJECT) // Spam from an object or avatar? + || (has_owner && (antispam->checkQueue(NACLAntiSpamRegistry::QUEUE_CHAT, owner_id))))) // Spam from a resident? return; // NaCl End @@ -6923,9 +6925,11 @@ void process_script_dialog(LLMessageSystem* msg, void**) // NaCl End } + bool has_owner = owner_id.notNull(); + // NaCl - Antispam - if (owner_id.isNull() ? is_spam_filtered(IM_COUNT, LLAvatarActions::isFriend(object_id), object_id == gAgentID) - : is_spam_filtered(IM_COUNT, LLAvatarActions::isFriend(owner_id), owner_id == gAgentID)) return; + if (!has_owner ? is_spam_filtered(IM_COUNT, LLAvatarActions::isFriend(object_id), object_id == gAgentID) + : is_spam_filtered(IM_COUNT, LLAvatarActions::isFriend(owner_id), !is_group && owner_id == gAgentID)) return; // NaCl End if (LLMuteList::getInstance()->isMuted(object_id) || LLMuteList::getInstance()->isMuted(owner_id)) @@ -6933,6 +6937,10 @@ void process_script_dialog(LLMessageSystem* msg, void**) return; } + auto chatter = gObjectList.findObject(object_id); + // Singu Note: Try to get Owner whenever possible + if (chatter && has_owner) chatter->mOwnerID = owner_id; + std::string message; std::string last_name; std::string object_name; @@ -6985,20 +6993,50 @@ void process_script_dialog(LLMessageSystem* msg, void**) } } + LLSD query_string; + query_string["owner"] = owner_id; + if (rlv_handler_t::isEnabled() && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) || gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS)) && !is_group && RlvUtil::isNearbyAgent(owner_id)) + { + query_string["rlv_shownames"] = true; + } + + if (const auto& obj = chatter ? chatter : gObjectList.findObject(owner_id)) // Fallback on the owner, if the chatter isn't present + { + auto& slurl = query_string["slurl"]; + const auto& region = obj->getRegion(); + if (rlv_handler_t::isEnabled() && gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC) && LLWorld::instance().isRegionListed(region)) + slurl = RlvStrings::getString(RLV_STRING_HIDDEN_REGION); + else + { + const auto& pos = obj->getPositionRegion(); + S32 x = ll_round((F32)fmod((F64)pos.mV[VX], (F64)REGION_WIDTH_METERS)); + S32 y = ll_round((F32)fmod((F64)pos.mV[VY], (F64)REGION_WIDTH_METERS)); + S32 z = ll_round((F32)pos.mV[VZ]); + std::ostringstream location; + location << region->getName() << '/' << x << '/' << y << '/' << z; + if (chatter != obj) location << "?owner_not_object"; + slurl = location.str(); + } + } + query_string["name"] = object_name; + query_string["groupowned"] = is_group; + object_name = LLSLURL("objectim", object_id, LLURI::mapToQueryString(query_string)).getSLURLString(); + LLSD args; args["TITLE"] = object_name; args["MESSAGE"] = message; args["CHANNEL"] = chat_channel; LLNotificationPtr notification; char const* name = (is_group && !is_text_box) ? "GROUPNAME" : "NAME"; - args[name] = is_group ? last_name : LLCacheName::buildFullName(first_name, last_name); + args[name] = has_owner ? is_group ? LLGroupActions::getSLURL(owner_id) : LLAvatarActions::getSLURL(owner_id) : + is_group ? last_name : LLCacheName::buildFullName(first_name, last_name); if (is_text_box) { args["DEFAULT"] = default_text; payload["textbox"] = "true"; LLNotificationsUtil::add("ScriptTextBoxDialog", args, payload, callback_script_dialog); } - else if (!first_name.empty()) + else if (!is_group) { notification = LLNotifications::instance().add( LLNotification::Params("ScriptDialog").substitutions(args).payload(payload).form_elements(form.asLLSD())); diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index f6d8a20a9..8deaa7829 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -1258,6 +1258,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, mesgsys->getUUIDFast(_PREHASH_ObjectData, _PREHASH_Sound, audio_uuid, block_num ); // HACK: Owner id only valid if non-null sound id or particle system mesgsys->getUUIDFast(_PREHASH_ObjectData, _PREHASH_OwnerID, owner_id, block_num ); + if (owner_id.notNull()) mOwnerID = owner_id; // Singu Note: Try to get Owner whenever possible mesgsys->getF32Fast( _PREHASH_ObjectData, _PREHASH_Gain, gain, block_num ); mesgsys->getU8Fast( _PREHASH_ObjectData, _PREHASH_Flags, sound_flags, block_num ); mesgsys->getU8Fast( _PREHASH_ObjectData, _PREHASH_Material, material, block_num ); diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index b18dc5de9..ca1eb74ab 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -965,6 +965,7 @@ void LLViewerRegion::forceUpdate() void LLViewerRegion::connectNeighbor(LLViewerRegion *neighborp, U32 direction) { mImpl->mLandp->connectNeighbor(neighborp->mImpl->mLandp, direction); + neighborp->mImpl->mLandp->connectNeighbor(mImpl->mLandp, gDirOpposite[direction]); #if ENABLE_CLASSIC_CLOUDS mCloudLayer.connectNeighbor(&(neighborp->mCloudLayer), direction); #endif diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 8fdd639f1..ded7fb2fa 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -247,7 +247,7 @@ const F32 MIN_AFK_TIME = 2.f; // minimum time after setting away state before co const F32 MAX_FAST_FRAME_TIME = 0.5f; const F32 FAST_FRAME_INCREMENT = 0.1f; -const F32 MIN_DISPLAY_SCALE = 0.75f; +const F32 MIN_DISPLAY_SCALE = 0.5f; std::string LLViewerWindow::sSnapshotBaseName; std::string LLViewerWindow::sSnapshotDir; diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index 31d6db341..e39dedba4 100644 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -81,7 +81,6 @@ LLVOGrass::SpeciesNames LLVOGrass::sSpeciesNames; LLVOGrass::LLVOGrass(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) : LLAlphaObject(id, pcode, regionp) { - mPatch = NULL; mLastPatchUpdateTime = 0; mGrassVel.clearVec(); mGrassBend.clearVec(); @@ -331,7 +330,8 @@ void LLVOGrass::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) return; } - if (mPatch && (mLastPatchUpdateTime != mPatch->getLastUpdateTime())) + const auto& patch = mPatch.lock(); + if (patch && (mLastPatchUpdateTime != patch->getLastUpdateTime())) { gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE); } @@ -507,9 +507,10 @@ void LLVOGrass::getGeometry(S32 idx, return ; } - mPatch = mRegionp->getLand().resolvePatchRegion(getPositionRegion()); - if (mPatch) - mLastPatchUpdateTime = mPatch->getLastUpdateTime(); + const auto& patch = mRegionp->getLand().resolvePatchRegion(getPositionRegion()); + if (patch) + mLastPatchUpdateTime = patch->getLastUpdateTime(); + mPatch = patch; LLVector3 position; // Create random blades of grass with gaussian distribution diff --git a/indra/newview/llvograss.h b/indra/newview/llvograss.h index 90911de7f..f4f1da6fe 100644 --- a/indra/newview/llvograss.h +++ b/indra/newview/llvograss.h @@ -108,7 +108,7 @@ public: F32 mBladeSizeX; F32 mBladeSizeY; - LLSurfacePatch *mPatch; // Stores the land patch where the grass is centered + std::weak_ptr mPatch; // Stores the land patch where the grass is centered U64 mLastPatchUpdateTime; diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp index 4907c944b..99312e1ca 100644 --- a/indra/newview/llvosurfacepatch.cpp +++ b/indra/newview/llvosurfacepatch.cpp @@ -267,18 +267,19 @@ BOOL LLVOSurfacePatch::updateGeometry(LLDrawable *drawable) length = patch_width / render_stride; - if (mPatchp->getNeighborPatch(NORTH)) + LLSurfacePatch* neighborPatch; + if (neighborPatch = mPatchp->getNeighborPatch(NORTH)) { - north_stride = mPatchp->getNeighborPatch(NORTH)->getRenderStride(); + north_stride = neighborPatch->getRenderStride(); } else { north_stride = render_stride; } - if (mPatchp->getNeighborPatch(EAST)) + if (neighborPatch = mPatchp->getNeighborPatch(EAST)) { - east_stride = mPatchp->getNeighborPatch(EAST)->getRenderStride(); + east_stride = neighborPatch->getRenderStride(); } else { diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index b62f653f3..722aaca16 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -5569,15 +5569,15 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) else { - if( type == LLDrawPool::POOL_FULLBRIGHT || type == LLDrawPool::POOL_FULLBRIGHT_ALPHA_MASK) - { - pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_FULLBRIGHT); - } //Annoying exception to the rule. getPoolTypeFromTE will return POOL_ALPHA_MASK for legacy bumpmaps, but there is no POOL_ALPHA_MASK in deferred. - else if(type == LLDrawPool::POOL_MATERIALS || (type == LLDrawPool::POOL_ALPHA_MASK && mat)) + if (type == LLDrawPool::POOL_MATERIALS || ((type == LLDrawPool::POOL_ALPHA_MASK || type == LLDrawPool::POOL_FULLBRIGHT_ALPHA_MASK) && mat)) { pool->addRiggedFace(facep, mat->getShaderMask()); } + else if (type == LLDrawPool::POOL_FULLBRIGHT || type == LLDrawPool::POOL_FULLBRIGHT_ALPHA_MASK) + { + pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_FULLBRIGHT); + } else if (type == LLDrawPool::POOL_BUMP && te->getBumpmap()) { pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_DEFERRED_BUMP); @@ -5674,7 +5674,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) type = LLDrawPool::POOL_FULLBRIGHT; } } - else if(force_simple && type != LLDrawPool::POOL_FULLBRIGHT && type != LLDrawPool::POOL_ALPHA_MASK && type != LLDrawPool::POOL_FULLBRIGHT_ALPHA_MASK) + else if(force_simple && type != LLDrawPool::POOL_FULLBRIGHT && (!LLPipeline::sRenderDeferred && (type != LLDrawPool::POOL_ALPHA_MASK && type != LLDrawPool::POOL_FULLBRIGHT_ALPHA_MASK))) { type = LLDrawPool::POOL_SIMPLE; } diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 4e94ce3b2..23cf8ab6d 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -673,7 +673,7 @@ LLSurfacePatch * LLWorld::resolveLandPatchGlobal(const LLVector3d &pos_global) return NULL; } - return regionp->getLand().resolvePatchGlobal(pos_global); + return regionp->getLand().resolvePatchGlobal(pos_global).get(); } diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index ee4c4c25d..887faf733 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2667,6 +2667,9 @@ void LLPipeline::clearRebuildGroups() iter != mGroupQ2.end(); ++iter) { LLSpatialGroup* group = *iter; + if (group == nullptr) { + LL_WARNS() << "Null spatial group in Pipeline::mGroupQ2." << LL_ENDL; + } // If the group contains HUD objects, save the group if (group->isHUDGroup()) diff --git a/indra/newview/skins/default/xui/en-us/menu_objects_list.xml b/indra/newview/skins/default/xui/en-us/menu_objects_list.xml index 7606a5bbb..356121620 100644 --- a/indra/newview/skins/default/xui/en-us/menu_objects_list.xml +++ b/indra/newview/skins/default/xui/en-us/menu_objects_list.xml @@ -1,5 +1,6 @@ + @@ -37,6 +38,10 @@ + + + + diff --git a/indra/newview/skins/default/xui/en-us/menu_objects_list_owners.xml b/indra/newview/skins/default/xui/en-us/menu_objects_list_owners.xml new file mode 100644 index 000000000..cf21c0756 --- /dev/null +++ b/indra/newview/skins/default/xui/en-us/menu_objects_list_owners.xml @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en-us/menu_url_object_owner.xml b/indra/newview/skins/default/xui/en-us/menu_url_object_owner.xml new file mode 100644 index 000000000..3ee8b614b --- /dev/null +++ b/indra/newview/skins/default/xui/en-us/menu_url_object_owner.xml @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en-us/menu_url_objectim.xml b/indra/newview/skins/default/xui/en-us/menu_url_objectim.xml index 6f32a938f..6ec0dac59 100644 --- a/indra/newview/skins/default/xui/en-us/menu_url_objectim.xml +++ b/indra/newview/skins/default/xui/en-us/menu_url_objectim.xml @@ -3,6 +3,8 @@ layout="topleft" label="Object" name="Url Popup"> + + + + @@ -76,25 +80,30 @@ - + + + + + + - + + diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml index f416f9550..dc1997700 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml @@ -23,7 +23,7 @@ UI Size: - + diff --git a/indra/newview/skins/default/xui/fr/notifications.xml b/indra/newview/skins/default/xui/fr/notifications.xml index a8eb049e3..d141ac555 100644 --- a/indra/newview/skins/default/xui/fr/notifications.xml +++ b/indra/newview/skins/default/xui/fr/notifications.xml @@ -3360,7 +3360,7 @@ L'objet [OBJECTFROMNAME] appartenant à un utilisateur inconnu vous a donné un( -[NAME] vous demande de devenir son ami(e). +[NAME_SLURL] vous demande de devenir son ami(e). [MESSAGE] @@ -3376,7 +3376,7 @@ L'objet [OBJECTFROMNAME] appartenant à un utilisateur inconnu vous a donné un( -[NAME] vous demande de devenir son ami. +[NAME_SLURL] vous demande de devenir son ami. (Par défaut, vous pourrez voir quand vous êtes les deux connecté(e)s).
@@ -3386,11 +3386,11 @@ L'objet [OBJECTFROMNAME] appartenant à un utilisateur inconnu vous a donné un( -[NAME] a accepté votre amitié. +[NAME_SLURL] a accepté votre amitié. [MESSAGE] -[NAME] a refusé votre amitié. +[NAME_SLURL] a refusé votre amitié. [MESSAGE]