Merge viewer-bear

master
Ansariel 2017-02-16 19:24:15 +01:00
commit bbbb8765fc
9 changed files with 48 additions and 17 deletions

View File

@ -173,10 +173,10 @@ void LLAvatarName::setExpires(F64 expires)
mExpires = LLFrameTimer::getTotalSeconds() + expires;
}
std::string LLAvatarName::getCompleteName(bool use_parentheses, bool force_use_display_name) const
std::string LLAvatarName::getCompleteName(bool use_parentheses, bool force_use_complete_name) const
{
std::string name;
if (sUseDisplayNames || force_use_display_name)
if (sUseDisplayNames || force_use_complete_name)
{
if (mUsername.empty() || mIsDisplayNameDefault)
{
@ -219,7 +219,7 @@ std::string LLAvatarName::getCompleteName(bool use_parentheses, bool force_use_d
else
{
name = mDisplayName;
if(sUseUsernames)
if(sUseUsernames || force_use_complete_name)
{
if(use_parentheses)
{

View File

@ -73,7 +73,7 @@ public:
// For normal names, returns "James Linden (james.linden)"
// When display names are disabled returns just "James Linden"
std::string getCompleteName(bool use_parentheses = true, bool force_use_display_name = false) const;
std::string getCompleteName(bool use_parentheses = true, bool force_use_complete_name = false) const;
// Returns "James Linden" or "bobsmith123 Resident" for backwards
// compatibility with systems like voice and muting

View File

@ -737,7 +737,7 @@ bool LLScrollListCtrl::updateColumnWidths()
S32 new_width = 0;
if (column->mRelWidth >= 0)
{
new_width = (S32)ll_round(column->mRelWidth * (mItemListRect.getWidth() - mTotalStaticColumnWidth - mTotalColumnPadding));
new_width = (S32)ll_round(column->mRelWidth*mItemListRect.getWidth());
}
else if (column->mDynamicWidth)
{
@ -2935,7 +2935,7 @@ void LLScrollListCtrl::addColumn(const LLScrollListColumn::Params& column_params
}
if (new_column->mRelWidth >= 0)
{
new_column->setWidth((S32)ll_round(new_column->mRelWidth * (mItemListRect.getWidth() - mTotalStaticColumnWidth - mTotalColumnPadding)));
new_column->setWidth((S32)ll_round(new_column->mRelWidth*mItemListRect.getWidth()));
}
else if(new_column->mDynamicWidth)
{

View File

@ -868,6 +868,22 @@ std::string LLUrlEntryAgentCompleteName::getName(const LLAvatarName& avatar_name
return avatar_name.getCompleteName(true, true);
}
//
// LLUrlEntryAgentLegacyName describes a Second Life agent legacy name Url, e.g.,
// secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/legacyname
// x-grid-location-info://lincoln.lindenlab.com/app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/legacyname
//
LLUrlEntryAgentLegacyName::LLUrlEntryAgentLegacyName()
{
mPattern = boost::regex(APP_HEADER_REGEX "/agent/[\\da-f-]+/legacyname",
boost::regex::perl|boost::regex::icase);
}
std::string LLUrlEntryAgentLegacyName::getName(const LLAvatarName& avatar_name)
{
return avatar_name.getLegacyName();
}
//
// LLUrlEntryAgentDisplayName describes a Second Life agent display name Url, e.g.,
// secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/displayname

View File

@ -312,6 +312,14 @@ private:
/*virtual*/ std::string getName(const LLAvatarName& avatar_name);
};
class LLUrlEntryAgentLegacyName : public LLUrlEntryAgentName
{
public:
LLUrlEntryAgentLegacyName();
private:
/*virtual*/ std::string getName(const LLAvatarName& avatar_name);
};
///
/// LLUrlEntryAgentDisplayName Describes a Second Life agent display name Url, e.g.,
/// secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/displayname

View File

@ -41,7 +41,7 @@ LLUrlRegistry::LLUrlRegistry()
{
// mUrlEntry.reserve(20);
// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
mUrlEntry.reserve(26);
mUrlEntry.reserve(27);
// [/RLVa:KB]
// Urls are matched in the order that they were registered
@ -65,6 +65,7 @@ LLUrlRegistry::LLUrlRegistry()
mUrlEntryHTTPLabel = new LLUrlEntryHTTPLabel();
registerUrl(mUrlEntryHTTPLabel);
registerUrl(new LLUrlEntryAgentCompleteName());
registerUrl(new LLUrlEntryAgentLegacyName());
registerUrl(new LLUrlEntryAgentDisplayName());
registerUrl(new LLUrlEntryAgentUserName());
// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Added: RLVa-1.2.2a

View File

@ -314,6 +314,13 @@ void LLFloaterIMNearbyChat::onClose(bool app_quitting)
{
// Override LLFloaterIMSessionTab::onClose() so that Nearby Chat is not removed from the conversation floater
LLFloaterIMSessionTab::restoreFloater();
if (app_quitting)
{
// We are starting and closing floater in "expanded" state
// Update expanded (restored) rect and position for use in next session
forceReshape();
storeRectControl();
}
}
// virtual

View File

@ -133,6 +133,9 @@ extern U32 JOINT_COUNT_REQUIRED_FOR_FULLRIG;
const F32 MAX_HOVER_Z = 2.0f;
const F32 MIN_HOVER_Z = -2.0f;
const F32 MIN_ATTACHMENT_COMPLEXITY = 0.f;
const F32 MAX_ATTACHMENT_COMPLEXITY = 1.0e6f;
using namespace LLAvatarAppearanceDefines;
//-----------------------------------------------------------------------------
@ -9943,10 +9946,10 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
const LLVOVolume* volume = drawable->getVOVolume();
if (volume)
{
U32 attachment_total_cost = 0;
U32 attachment_volume_cost = 0;
U32 attachment_texture_cost = 0;
U32 attachment_children_cost = 0;
F32 attachment_total_cost = 0;
F32 attachment_volume_cost = 0;
F32 attachment_texture_cost = 0;
F32 attachment_children_cost = 0;
attachment_volume_cost += volume->getRenderCost(textures);
@ -9970,7 +9973,6 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
// add the cost of each individual texture in the linkset
attachment_texture_cost += volume_texture->second;
}
attachment_total_cost = attachment_volume_cost + attachment_texture_cost + attachment_children_cost;
LL_DEBUGS("ARCdetail") << "Attachment costs " << attached_object->getAttachmentItemID()
<< " total: " << attachment_total_cost
@ -9979,7 +9981,8 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
<< ", " << volume->numChildren()
<< " children: " << attachment_children_cost
<< LL_ENDL;
cost += attachment_total_cost;
// Limit attachment complexity to avoid signed integer flipping of the wearer's ACI
cost += (U32)llclamp(attachment_total_cost, MIN_ATTACHMENT_COMPLEXITY, MAX_ATTACHMENT_COMPLEXITY);
}
}
}

View File

@ -85,8 +85,6 @@
const F32 FORCE_SIMPLE_RENDER_AREA = 512.f;
const F32 FORCE_CULL_AREA = 8.f;
const F32 MIN_RENDER_COMPLEXITY = 0.f;
const F32 MAX_RENDER_COMPLEXITY = 1.0e6f;
U32 JOINT_COUNT_REQUIRED_FOR_FULLRIG = 1;
BOOL gAnimateTextures = TRUE;
@ -3686,8 +3684,6 @@ U32 LLVOVolume::getRenderCost(texture_cost_t &textures) const
shame += media_faces * ARC_MEDIA_FACE_COST;
}
shame = llclamp(shame, MIN_RENDER_COMPLEXITY, MAX_RENDER_COMPLEXITY);
if (shame > mRenderComplexity_current)
{
mRenderComplexity_current = (S32)shame;