-LLCached[COA]Control can now be static const. Use for readonly access.
-const'd all readonly LLCached[COA]Controls to prevent altering by mistake. -added get() accessor to LLCached[COA]Controls to return cached type explicitly without manual casts. -added missing operators to LLCachedCOAControl -Converted a few more settings to LLCached[COA]Control -Fixed LLColor4U -> LLSD -> LLColor4 problems in LLCachedControl Ascent functionality fixes: -Tag coloring pulled out of getClientInfo(Redundant. idleUpdateNameTag already handled it) --Tag and color substituted at render-time. Simple boolean logic. Neglible perf penalty. -Fixed llinfos spam if AscentShowSelfTagColor = false -Client tag updated less superfluously
This commit is contained in:
@@ -300,7 +300,7 @@ private:
|
||||
}
|
||||
else
|
||||
{
|
||||
mCachedValue = (const T&)mControl->getValue();
|
||||
handleValueChange(mControl->getValue());
|
||||
}
|
||||
|
||||
// Add a listener to the controls signal...
|
||||
@@ -324,7 +324,15 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
operator const T&() { return mCachedValue; }
|
||||
operator const T&() const { return mCachedValue; }
|
||||
/* Sometimes implicit casting doesn't work.
|
||||
For instance, something like "LLCachedControl<LLColor4> color("blah",LLColor4()); color.getValue();"
|
||||
will not compile as it will look for the function getValue() in LLCachedControl, which doesn't exist.
|
||||
Use 'color.get().getValue()' instead if something like this happens.
|
||||
|
||||
Manually casting to (const T) would work too, but it's ugly and requires knowledge of LLCachedControl's internals
|
||||
*/
|
||||
const T &get() const { return mCachedValue; }
|
||||
|
||||
LLPointer<LLControlVariable> getControl() const
|
||||
{
|
||||
@@ -343,10 +351,20 @@ private:
|
||||
group.declareControl(name, type, init_value, comment, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
bool handleValueChange(const LLSD& newvalue)
|
||||
template <class TT> void setValue(const LLSD& newvalue) //default behavior
|
||||
{
|
||||
mCachedValue = (const T &)newvalue;
|
||||
}
|
||||
template <> void setValue<LLColor4>(const LLSD& newvalue)
|
||||
{
|
||||
if(mControl->isType(TYPE_COL4U))
|
||||
mCachedValue.set(LLColor4U(newvalue)); //a color4u LLSD cannot be auto-converted to color4.. so do it manually.
|
||||
else
|
||||
mCachedValue = (const T &)newvalue;
|
||||
}
|
||||
bool handleValueChange(const LLSD& newvalue)
|
||||
{
|
||||
setValue<T>(newvalue);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -383,6 +401,11 @@ public:
|
||||
if(mCOAConnection.connected())
|
||||
mCOAConnection.disconnect();
|
||||
}
|
||||
LLCachedCOAControl& operator =(const T& newvalue)
|
||||
{
|
||||
mCachedControl = newvalue;
|
||||
return *this;
|
||||
}
|
||||
bool handleCOAValueChange(const LLSD& newvalue)
|
||||
{
|
||||
if(mCachedControl)
|
||||
@@ -390,7 +413,8 @@ public:
|
||||
mCachedControl = new LLCachedControl<T>(mName,mDefault,gCOASavedSettings,mComment);
|
||||
return true;
|
||||
}
|
||||
operator const T&() { return *mCachedControl; }
|
||||
operator const T&() const { return *mCachedControl; }
|
||||
const T &get() const { return *mCachedControl; }
|
||||
};
|
||||
|
||||
//Following is actually defined in newview/llviewercontrol.cpp, but extern access is fine (Unless GCC bites me)
|
||||
|
||||
@@ -543,7 +543,7 @@ void LLAgent::resetView(BOOL reset_camera, BOOL change_camera)
|
||||
gMenuHolder->hideMenus();
|
||||
}
|
||||
|
||||
static LLCachedControl<bool> freeze_time("FreezeTime",false);
|
||||
static const LLCachedControl<bool> freeze_time("FreezeTime",false);
|
||||
if (change_camera && !freeze_time)
|
||||
{
|
||||
changeCameraToDefault();
|
||||
@@ -786,7 +786,7 @@ BOOL LLAgent::canFly()
|
||||
if (isGodlike()) return TRUE;
|
||||
|
||||
// <edit>
|
||||
static LLCachedControl<bool> ascent_fly_always_enabled("AscentFlyAlwaysEnabled",false);
|
||||
static const LLCachedControl<bool> ascent_fly_always_enabled("AscentFlyAlwaysEnabled",false);
|
||||
if(ascent_fly_always_enabled)
|
||||
return TRUE;
|
||||
// </edit>
|
||||
@@ -1973,7 +1973,7 @@ void LLAgent::cameraOrbitIn(const F32 meters)
|
||||
|
||||
mCameraZoomFraction = (mTargetCameraDistance - meters) / camera_offset_dist;
|
||||
|
||||
static LLCachedControl<bool> freeze_time("FreezeTime",false);
|
||||
static const LLCachedControl<bool> freeze_time("FreezeTime",false);
|
||||
if (!freeze_time && mCameraZoomFraction < MIN_ZOOM_FRACTION && meters > 0.f)
|
||||
{
|
||||
// No need to animate, camera is already there.
|
||||
@@ -6369,7 +6369,7 @@ void LLAgent::teleportViaLocationLookAt(const LLVector3d& pos_global)
|
||||
void LLAgent::setTeleportState(ETeleportState state)
|
||||
{
|
||||
mTeleportState = state;
|
||||
static LLCachedControl<bool> freeze_time("FreezeTime",false);
|
||||
static const LLCachedControl<bool> freeze_time("FreezeTime",false);
|
||||
if (mTeleportState > TELEPORT_NONE && freeze_time)
|
||||
{
|
||||
LLFloaterSnapshot::hide(0);
|
||||
|
||||
@@ -1020,7 +1020,7 @@ bool LLAppViewer::mainLoop()
|
||||
// Sleep and run background threads
|
||||
{
|
||||
LLFastTimer t2(LLFastTimer::FTM_SLEEP);
|
||||
static LLCachedControl<bool> run_multiple_threads("RunMultipleThreads",false);
|
||||
static const LLCachedControl<bool> run_multiple_threads("RunMultipleThreads",false);
|
||||
|
||||
// yield some time to the os based on command line option
|
||||
if(mYieldTime >= 0)
|
||||
@@ -4077,7 +4077,7 @@ void LLAppViewer::resumeMainloopTimeout(const std::string& state, F32 secs)
|
||||
{
|
||||
if(secs < 0.0f)
|
||||
{
|
||||
static LLCachedControl<F32> mainloop_timeout_default("ThrottleBandwidthKBPS",20);
|
||||
static const LLCachedControl<F32> mainloop_timeout_default("ThrottleBandwidthKBPS",20);
|
||||
secs = mainloop_timeout_default;
|
||||
}
|
||||
|
||||
@@ -4105,7 +4105,7 @@ void LLAppViewer::pingMainloopTimeout(const std::string& state, F32 secs)
|
||||
{
|
||||
if(secs < 0.0f)
|
||||
{
|
||||
static LLCachedControl<F32> mainloop_timeout_default("ThrottleBandwidthKBPS",20);
|
||||
static const LLCachedControl<F32> mainloop_timeout_default("ThrottleBandwidthKBPS",20);
|
||||
secs = mainloop_timeout_default;
|
||||
}
|
||||
|
||||
|
||||
@@ -185,7 +185,7 @@ void LLDrawPoolBump::prerender()
|
||||
// static
|
||||
S32 LLDrawPoolBump::numBumpPasses()
|
||||
{
|
||||
static LLCachedControl<bool> render_object_bump("RenderObjectBump",false);
|
||||
static const LLCachedControl<bool> render_object_bump("RenderObjectBump",false);
|
||||
if (render_object_bump)
|
||||
{
|
||||
if (mVertexShaderLevel > 1)
|
||||
|
||||
@@ -209,7 +209,7 @@ void LLDrawPoolTerrain::render(S32 pass)
|
||||
}
|
||||
|
||||
// Special-case for land ownership feedback
|
||||
static LLCachedControl<bool> show_parcel_owners("ShowParcelOwners",false);
|
||||
static const LLCachedControl<bool> show_parcel_owners("ShowParcelOwners",false);
|
||||
if (show_parcel_owners)
|
||||
{
|
||||
if (mVertexShaderLevel > 1)
|
||||
|
||||
@@ -700,22 +700,26 @@ void LLFloaterAvatarList::refreshAvatarList()
|
||||
//Lindens are always more Linden than your friend, make that take precedence
|
||||
if(LLMuteList::getInstance()->isLinden(av_name))
|
||||
{
|
||||
element["columns"][LIST_AVATAR_NAME]["color"] = gCOASavedSettings->getColor4("AscentLindenColor").getValue();
|
||||
static const LLCachedCOAControl<LLColor4> ascent_linden_color("AscentLindenColor",LLColor4(0.f,0.f,1.f,1.f));
|
||||
element["columns"][LIST_AVATAR_NAME]["color"] = ascent_linden_color.get().getValue();
|
||||
}
|
||||
//check if they are an estate owner at their current position
|
||||
else if(estate_owner.notNull() && av_id == estate_owner)
|
||||
{
|
||||
element["columns"][LIST_AVATAR_NAME]["color"] = gCOASavedSettings->getColor4("AscentEstateOwnerColor").getValue();
|
||||
static const LLCachedCOAControl<LLColor4> ascent_estate_owner_color("AscentEstateOwnerColor",LLColor4(1.f,0.6f,1.f,1.f));
|
||||
element["columns"][LIST_AVATAR_NAME]["color"] = ascent_estate_owner_color.get().getValue();
|
||||
}
|
||||
//without these dots, SL would suck.
|
||||
else if(is_agent_friend(av_id))
|
||||
{
|
||||
element["columns"][LIST_AVATAR_NAME]["color"] = gCOASavedSettings->getColor4("AscentFriendColor").getValue();
|
||||
static const LLCachedCOAControl<LLColor4> ascent_friend_color("AscentFriendColor",LLColor4(1.f,1.f,0.f,1.f));
|
||||
element["columns"][LIST_AVATAR_NAME]["color"] = ascent_friend_color.get().getValue();
|
||||
}
|
||||
//big fat jerkface who is probably a jerk, display them as such.
|
||||
else if(LLMuteList::getInstance()->isMuted(av_id))
|
||||
{
|
||||
element["columns"][LIST_AVATAR_NAME]["color"] = gCOASavedSettings->getColor4("AscentMutedColor").getValue();
|
||||
static const LLCachedCOAControl<LLColor4> ascent_muted_color("AscentMutedColor",LLColor4(0.7f,0.7f,0.7f,1.f));
|
||||
element["columns"][LIST_AVATAR_NAME]["color"] = ascent_muted_color.get().getValue();
|
||||
}
|
||||
|
||||
|
||||
@@ -807,15 +811,17 @@ void LLFloaterAvatarList::refreshAvatarList()
|
||||
//element["columns"][LIST_METADATA]["column"] = "metadata";
|
||||
//element["columns"][LIST_METADATA]["type"] = "text";
|
||||
|
||||
LLColor4 avatar_name_color = gColors.getColor( "AvatarNameColor" );
|
||||
static const LLCachedControl<LLColor4> avatar_name_color("AvatarNameColor",LLColor4(LLColor4U(251, 175, 93, 255)), gColors );
|
||||
static const LLCachedControl<LLColor4> unselected_color("ScrollUnselectedColor",LLColor4(LLColor4U(0, 0, 0, 204)), gColors );
|
||||
LLColor4 name_color(avatar_name_color);
|
||||
std::string client;
|
||||
LLVOAvatar *avatarp = gObjectList.findAvatar(av_id);
|
||||
if(avatarp)
|
||||
{
|
||||
avatarp->getClientInfo(client, avatar_name_color, TRUE);
|
||||
avatarp->getClientInfo(client, name_color, TRUE);
|
||||
if(client == "")
|
||||
{
|
||||
avatar_name_color = gColors.getColor( "ScrollUnselectedColor" );
|
||||
name_color = unselected_color;
|
||||
client = "?";
|
||||
}
|
||||
element["columns"][LIST_CLIENT]["value"] = client.c_str();
|
||||
@@ -833,9 +839,9 @@ void LLFloaterAvatarList::refreshAvatarList()
|
||||
element["columns"][LIST_CLIENT]["value"] = "Out Of Range";
|
||||
}
|
||||
//Blend to make the color show up better
|
||||
avatar_name_color = avatar_name_color * 0.5f + gColors.getColor( "ScrollUnselectedColor" ) * 0.5f;
|
||||
name_color = name_color *.5f + unselected_color * .5f;
|
||||
|
||||
element["columns"][LIST_CLIENT]["color"] = avatar_name_color.getValue();
|
||||
element["columns"][LIST_CLIENT]["color"] = avatar_name_color.get().getValue();
|
||||
|
||||
// Add to list
|
||||
mAvatarList->addElement(element, ADD_BOTTOM);
|
||||
|
||||
@@ -733,7 +733,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
|
||||
|
||||
LLVector3 new_camera_pos = LLViewerCamera::getInstance()->getOrigin();
|
||||
LLQuaternion new_camera_rot = LLViewerCamera::getInstance()->getQuaternion();
|
||||
static LLCachedControl<bool> freeze_time("FreezeTime",false);
|
||||
static const LLCachedControl<bool> freeze_time("FreezeTime",false);
|
||||
if (freeze_time &&
|
||||
(new_camera_pos != previewp->mCameraPos || dot(new_camera_rot, previewp->mCameraRot) < 0.995f))
|
||||
{
|
||||
@@ -2160,7 +2160,7 @@ LLSnapshotFloaterView::~LLSnapshotFloaterView()
|
||||
BOOL LLSnapshotFloaterView::handleKey(KEY key, MASK mask, BOOL called_from_parent)
|
||||
{
|
||||
// use default handler when not in freeze-frame mode
|
||||
static LLCachedControl<bool> freeze_time("FreezeTime",false);
|
||||
static const LLCachedControl<bool> freeze_time("FreezeTime",false);
|
||||
if(!freeze_time)
|
||||
{
|
||||
return LLFloaterView::handleKey(key, mask, called_from_parent);
|
||||
@@ -2182,7 +2182,7 @@ BOOL LLSnapshotFloaterView::handleKey(KEY key, MASK mask, BOOL called_from_paren
|
||||
BOOL LLSnapshotFloaterView::handleMouseDown(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
// use default handler when not in freeze-frame mode
|
||||
static LLCachedControl<bool> freeze_time("FreezeTime",false);
|
||||
static const LLCachedControl<bool> freeze_time("FreezeTime",false);
|
||||
if(!freeze_time)
|
||||
{
|
||||
return LLFloaterView::handleMouseDown(x, y, mask);
|
||||
@@ -2198,7 +2198,7 @@ BOOL LLSnapshotFloaterView::handleMouseDown(S32 x, S32 y, MASK mask)
|
||||
BOOL LLSnapshotFloaterView::handleMouseUp(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
// use default handler when not in freeze-frame mode
|
||||
static LLCachedControl<bool> freeze_time("FreezeTime",false);
|
||||
static const LLCachedControl<bool> freeze_time("FreezeTime",false);
|
||||
if(!freeze_time)
|
||||
{
|
||||
return LLFloaterView::handleMouseUp(x, y, mask);
|
||||
@@ -2214,7 +2214,7 @@ BOOL LLSnapshotFloaterView::handleMouseUp(S32 x, S32 y, MASK mask)
|
||||
BOOL LLSnapshotFloaterView::handleHover(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
// use default handler when not in freeze-frame mode
|
||||
static LLCachedControl<bool> freeze_time("FreezeTime",false);
|
||||
static const LLCachedControl<bool> freeze_time("FreezeTime",false);
|
||||
if(!freeze_time)
|
||||
{
|
||||
return LLFloaterView::handleHover(x, y, mask);
|
||||
|
||||
@@ -2939,7 +2939,7 @@ const std::string LLFolderView::getFilterSubString(BOOL trim)
|
||||
void LLFolderView::filter( LLInventoryFilter& filter )
|
||||
{
|
||||
LLFastTimer t2(LLFastTimer::FTM_FILTER);
|
||||
static LLCachedControl<S32> filter_items_per_frame("FilterItemsPerFrame",500);
|
||||
static const LLCachedControl<S32> filter_items_per_frame("FilterItemsPerFrame",500);
|
||||
filter.setFilterCount(llclamp((S32)filter_items_per_frame, 1, 5000));
|
||||
|
||||
if (getCompletedFilterGeneration() < filter.getCurrentGeneration())
|
||||
@@ -4395,7 +4395,7 @@ void LLFolderView::doIdle()
|
||||
{
|
||||
LLFastTimer t2(LLFastTimer::FTM_INVENTORY);
|
||||
|
||||
static LLCachedControl<bool> debug_filters("DebugInventoryFilters",false);
|
||||
static const LLCachedControl<bool> debug_filters("DebugInventoryFilters",false);
|
||||
if (debug_filters != (bool)getDebugFilters())
|
||||
{
|
||||
mDebugFilters = debug_filters;
|
||||
|
||||
@@ -504,7 +504,7 @@ void LLHUDEffectLookAt::setSourceObject(LLViewerObject* objectp)
|
||||
//-----------------------------------------------------------------------------
|
||||
void LLHUDEffectLookAt::render()
|
||||
{
|
||||
static LLCachedControl<bool> private_look_at("PrivateLookAt",false);
|
||||
static const LLCachedControl<bool> private_look_at("PrivateLookAt",false);
|
||||
if (private_look_at &&
|
||||
(gAgent.getAvatarObject() == ((LLVOAvatar*)(LLViewerObject*)mSourceObject))) return;
|
||||
if (sDebugLookAt && mSourceObject.notNull())
|
||||
|
||||
@@ -124,7 +124,7 @@ void handle_inventory(void*)
|
||||
void handle_chat(void*)
|
||||
{
|
||||
// give focus to chatbar if it's open but not focused
|
||||
static LLCachedControl<bool> chat_visible("ChatVisible",true);
|
||||
static const LLCachedControl<bool> chat_visible("ChatVisible",true);
|
||||
if (chat_visible && gFocusMgr.childHasKeyboardFocus(gChatBar))
|
||||
{
|
||||
LLChatBar::stopChat();
|
||||
|
||||
@@ -359,11 +359,11 @@ void LLNetMap::draw()
|
||||
// Draw avatars
|
||||
// LLColor4 mapcolor = gAvatarMapColor;
|
||||
|
||||
LLColor4 standard_color = gColors.getColor( "MapAvatar" );
|
||||
LLColor4 friend_color = gCOASavedSettings->getColor4("AscentFriendColor");
|
||||
LLColor4 em_color = gCOASavedSettings->getColor4("AscentEstateOwnerColor");
|
||||
LLColor4 linden_color = gCOASavedSettings->getColor4("AscentLindenColor");
|
||||
LLColor4 muted_color = gCOASavedSettings->getColor4("AscentMutedColor");
|
||||
static const LLCachedControl<LLColor4> standard_color("MapAvatar",LLColor4(0.f,1.f,0.f,1.f),gColors);
|
||||
static const LLCachedCOAControl<LLColor4> friend_color("AscentFriendColor",LLColor4(1.f,1.f,0.f,1.f));
|
||||
static const LLCachedCOAControl<LLColor4> em_color("AscentEstateOwnerColor",LLColor4(1.f,0.6f,1.f,1.f));
|
||||
static const LLCachedCOAControl<LLColor4> linden_color("AscentLindenColor",LLColor4(0.f,0.f,1.f,1.f));
|
||||
static const LLCachedCOAControl<LLColor4> muted_color("AscentMutedColor",LLColor4(0.7f,0.7f,0.7f,1.f));
|
||||
|
||||
std::vector<LLUUID> avatar_ids;
|
||||
std::vector<LLVector3d> positions;
|
||||
|
||||
@@ -371,7 +371,7 @@ void LLOverlayBar::refresh()
|
||||
childSetVisible("voice_remote_container", LLVoiceClient::voiceEnabled());
|
||||
|
||||
// always let user toggle into and out of chatbar
|
||||
static LLCachedControl<bool> chat_visible("ChatVisible",true);
|
||||
static const LLCachedControl<bool> chat_visible("ChatVisible",true);
|
||||
childSetVisible("chat_bar", chat_visible);
|
||||
|
||||
if (buttons_changed)
|
||||
|
||||
@@ -1302,7 +1302,7 @@ void LLSpatialGroup::doOcclusion(LLCamera* camera)
|
||||
{
|
||||
if (mSpatialPartition->isOcclusionEnabled() && LLPipeline::sUseOcclusion > 1)
|
||||
{
|
||||
static LLCachedControl<BOOL> render_water_void_culling("RenderWaterVoidCulling", TRUE);
|
||||
static const LLCachedControl<BOOL> render_water_void_culling("RenderWaterVoidCulling", TRUE);
|
||||
// Don't cull hole/edge water, unless RenderWaterVoidCulling is set and we have the GL_ARB_depth_clamp extension.
|
||||
if ((mSpatialPartition->mDrawableType == LLPipeline::RENDER_TYPE_VOIDWATER &&
|
||||
!(render_water_void_culling && gGLManager.mHasDepthClamp)) ||
|
||||
|
||||
@@ -109,7 +109,7 @@ void LLStatGraph::draw()
|
||||
// gColors.getColor("ColorDropShadow"),
|
||||
// (S32) gSavedSettings.getF32("DropShadowFloater") );
|
||||
|
||||
static LLCachedControl<LLColor4> menu_default_color("MenuDefaultBgColor",LLColor4(0,0,255),gColors);
|
||||
static const LLCachedControl<LLColor4> menu_default_color("MenuDefaultBgColor",LLColor4(0.f,0.f,0.f,1.f),gColors);
|
||||
color = menu_default_color;
|
||||
gGL.color4fv(color.mV);
|
||||
gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, TRUE);
|
||||
|
||||
@@ -236,8 +236,8 @@ void LLStatusBar::draw()
|
||||
|
||||
if (isBackgroundVisible())
|
||||
{
|
||||
static LLCachedControl<LLColor4> color_drop_shadow("ColorDropShadow",LLColor4(0,0,200),LLUI::sColorsGroup);
|
||||
static LLCachedControl<S32> drop_shadow_floater("DropShadowFloater",5,LLUI::sConfigGroup);
|
||||
static const LLCachedControl<LLColor4> color_drop_shadow("ColorDropShadow",LLColor4(LLColor4U(0,0,0,200)),LLUI::sColorsGroup);
|
||||
static const LLCachedControl<S32> drop_shadow_floater("DropShadowFloater",5,LLUI::sConfigGroup);
|
||||
gl_drop_shadow(0, getRect().getHeight(), getRect().getWidth(), 0,
|
||||
color_drop_shadow,
|
||||
drop_shadow_floater );
|
||||
|
||||
@@ -722,7 +722,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
|
||||
if (mState == LOAD_FROM_NETWORK)
|
||||
{
|
||||
static LLCachedControl<bool> image_pipeline_use_http("ImagePipelineUseHTTP",false);
|
||||
static const LLCachedControl<bool> image_pipeline_use_http("ImagePipelineUseHTTP",false);
|
||||
bool get_url = image_pipeline_use_http;
|
||||
if (!mUrl.empty()) get_url = false;
|
||||
// if (mHost != LLHost::invalid) get_url = false;
|
||||
@@ -1606,7 +1606,7 @@ S32 LLTextureFetch::update(U32 max_time_ms)
|
||||
{
|
||||
S32 res;
|
||||
|
||||
static LLCachedControl<F32> throttle_bandwidth_kbps("ThrottleBandwidthKBPS",500);
|
||||
static const LLCachedControl<F32> throttle_bandwidth_kbps("ThrottleBandwidthKBPS",500);
|
||||
mMaxBandwidth = throttle_bandwidth_kbps;
|
||||
|
||||
res = LLWorkerThread::update(max_time_ms);
|
||||
|
||||
@@ -216,7 +216,7 @@ void LLToolCamera::pickCallback(const LLPickInfo& pick_info)
|
||||
gAgent.setFocusGlobal(pick_info);
|
||||
}
|
||||
|
||||
static LLCachedControl<bool> freeze_time("FreezeTime",0);
|
||||
static const LLCachedControl<bool> freeze_time("FreezeTime",0);
|
||||
if (!(pick_info.mKeyMask & MASK_ALT) &&
|
||||
gAgent.cameraThirdPerson() &&
|
||||
gViewerWindow->getLeftMouseDown() &&
|
||||
|
||||
@@ -239,7 +239,7 @@ bool LLToolMgr::inBuildMode()
|
||||
// when entering mouselook inEdit() immediately returns true before
|
||||
// cameraMouselook() actually starts returning true. Also, appearance edit
|
||||
// sets build mode to true, so let's exclude that.
|
||||
static LLCachedControl<bool> build_btn_state("BuildBtnState",false);
|
||||
static const LLCachedControl<bool> build_btn_state("BuildBtnState",false);
|
||||
bool b=(inEdit()
|
||||
&& build_btn_state
|
||||
&& !gAgent.cameraMouselook()
|
||||
|
||||
@@ -114,24 +114,24 @@ void init_audio()
|
||||
|
||||
void audio_update_volume(bool force_update)
|
||||
{
|
||||
static LLCachedControl<F32> master_volume("AudioLevelMaster",1.0);
|
||||
static LLCachedControl<F32> audio_level_sfx("AudioLevelSFX",1.0);
|
||||
static LLCachedControl<F32> audio_level_ui("AudioLevelUI",1.0);
|
||||
static LLCachedControl<F32> audio_level_ambient("AudioLevelAmbient",1.0);
|
||||
static LLCachedControl<F32> audio_level_music("AudioLevelMusic",1.0);
|
||||
static LLCachedControl<F32> audio_level_media("AudioLevelMedia",1.0);
|
||||
static LLCachedControl<F32> audio_level_voice("AudioLevelVoice",1.0);
|
||||
static LLCachedControl<F32> audio_level_mic("AudioLevelMic",1.0);
|
||||
static LLCachedControl<bool> _mute_audio("MuteAudio",false);
|
||||
static LLCachedControl<bool> mute_sounds("MuteSounds",false);
|
||||
static LLCachedControl<bool> mute_ui("MuteUI",false);
|
||||
static LLCachedControl<bool> mute_ambient("MuteAmbient",false);
|
||||
static LLCachedControl<bool> mute_music("MuteMusic",false);
|
||||
static LLCachedControl<bool> mute_media("MuteMedia",false);
|
||||
static LLCachedControl<bool> mute_voice("MuteVoice",false);
|
||||
static LLCachedControl<bool> mute_when_minimized("MuteWhenMinimized",true);
|
||||
static LLCachedControl<F32> audio_level_doppler("AudioLevelDoppler",1.0);
|
||||
static LLCachedControl<F32> audio_level_rolloff("AudioLevelRolloff",1.0);
|
||||
static const LLCachedControl<F32> master_volume("AudioLevelMaster",1.0);
|
||||
static const LLCachedControl<F32> audio_level_sfx("AudioLevelSFX",1.0);
|
||||
static const LLCachedControl<F32> audio_level_ui("AudioLevelUI",1.0);
|
||||
static const LLCachedControl<F32> audio_level_ambient("AudioLevelAmbient",1.0);
|
||||
static const LLCachedControl<F32> audio_level_music("AudioLevelMusic",1.0);
|
||||
static const LLCachedControl<F32> audio_level_media("AudioLevelMedia",1.0);
|
||||
static const LLCachedControl<F32> audio_level_voice("AudioLevelVoice",1.0);
|
||||
static const LLCachedControl<F32> audio_level_mic("AudioLevelMic",1.0);
|
||||
static const LLCachedControl<bool> _mute_audio("MuteAudio",false);
|
||||
static const LLCachedControl<bool> mute_sounds("MuteSounds",false);
|
||||
static const LLCachedControl<bool> mute_ui("MuteUI",false);
|
||||
static const LLCachedControl<bool> mute_ambient("MuteAmbient",false);
|
||||
static const LLCachedControl<bool> mute_music("MuteMusic",false);
|
||||
static const LLCachedControl<bool> mute_media("MuteMedia",false);
|
||||
static const LLCachedControl<bool> mute_voice("MuteVoice",false);
|
||||
static const LLCachedControl<bool> mute_when_minimized("MuteWhenMinimized",true);
|
||||
static const LLCachedControl<F32> audio_level_doppler("AudioLevelDoppler",1.0);
|
||||
static const LLCachedControl<F32> audio_level_rolloff("AudioLevelRolloff",1.0);
|
||||
BOOL mute_audio = _mute_audio;
|
||||
if (!gViewerWindow->getActive() && mute_when_minimized)
|
||||
{
|
||||
@@ -228,7 +228,7 @@ void audio_update_wind(bool force_update)
|
||||
//
|
||||
if (force_update || (last_camera_water_height * camera_water_height) < 0.f)
|
||||
{
|
||||
static LLCachedControl<F32> audio_level_rolloff("AudioLevelRolloff",1);
|
||||
static const LLCachedControl<F32> audio_level_rolloff("AudioLevelRolloff",1);
|
||||
if (camera_water_height < 0.f)
|
||||
{
|
||||
gAudiop->setRolloffFactor(audio_level_rolloff * LL_ROLLOFF_MULTIPLIER_UNDER_WATER);
|
||||
@@ -246,10 +246,10 @@ void audio_update_wind(bool force_update)
|
||||
// don't use the setter setMaxWindGain() because we don't
|
||||
// want to screw up the fade-in on startup by setting actual source gain
|
||||
// outside the fade-in.
|
||||
static LLCachedControl<bool> mute_audio("MuteAudio",false);
|
||||
static LLCachedControl<bool> mute_ambient("MuteAmbient",false);
|
||||
static LLCachedControl<F32> audio_level_master("AudioLevelMaster",1);
|
||||
static LLCachedControl<F32> audio_level_ambient("AudioLevelAmbient",1);
|
||||
static const LLCachedControl<bool> mute_audio("MuteAudio",false);
|
||||
static const LLCachedControl<bool> mute_ambient("MuteAmbient",false);
|
||||
static const LLCachedControl<F32> audio_level_master("AudioLevelMaster",1);
|
||||
static const LLCachedControl<F32> audio_level_ambient("AudioLevelAmbient",1);
|
||||
F32 master_volume = mute_audio ? 0.f : mute_ambient;
|
||||
F32 ambient_volume = mute_ambient ? 0.f : audio_level_ambient;
|
||||
|
||||
|
||||
@@ -665,16 +665,12 @@ void settings_setup_listeners()
|
||||
gSavedSettings.getControl("SkyUseClassicClouds")->getSignal()->connect(boost::bind(&handleCloudSettingsChanged, _1));
|
||||
|
||||
gSavedSettings.getControl("AscentStoreSettingsPerAccount")->getSignal()->connect(boost::bind(&handleAscentCOAChange,_1));
|
||||
gSavedSettings.getControl("AscentShowSelfTag")->getSignal()->connect(boost::bind(&handleAscentSelfTag,_1));
|
||||
gSavedSettings.getControl("AscentShowSelfTagColor")->getSignal()->connect(boost::bind(&handleAscentSelfTag,_1));
|
||||
gSavedSettings.getControl("AscentUseTag")->getSignal()->connect(boost::bind(&handleAscentSelfTag,_1));
|
||||
gCOASavedSettings->getControl("AscentUseCustomTag")->getSignal()->connect(boost::bind(&handleAscentSelfTag,_1));
|
||||
gCOASavedSettings->getControl("AscentCustomTagColor")->getSignal()->connect(boost::bind(&handleAscentSelfTag,_1));
|
||||
gCOASavedSettings->getControl("AscentCustomTagLabel")->getSignal()->connect(boost::bind(&handleAscentSelfTag,_1));
|
||||
gCOASavedSettings->getControl("AscentReportClientUUID")->getSignal()->connect(boost::bind(&handleAscentSelfTag,_1));
|
||||
gSavedSettings.getControl("AscentShowFriendsTag")->getSignal()->connect(boost::bind(&handleAscentGlobalTag,_1));
|
||||
gSavedSettings.getControl("AscentShowOthersTag")->getSignal()->connect(boost::bind(&handleAscentGlobalTag,_1));
|
||||
gSavedSettings.getControl("AscentShowOthersTagColor")->getSignal()->connect(boost::bind(&handleAscentGlobalTag,_1));
|
||||
gSavedSettings.getControl("AscentUseStatusColors")->getSignal()->connect(boost::bind(&handleAscentGlobalTag,_1));
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ extern std::map<std::string, LLControlGroup*> gSettings;
|
||||
void create_graphics_group(LLControlGroup& group);
|
||||
|
||||
// saved at end of session
|
||||
extern LLControlGroup *gCOASavedSettings;
|
||||
// gSavedSettings and gCOASavedSettings moved to llcontrol.h
|
||||
extern LLControlGroup gSavedPerAccountSettings;
|
||||
|
||||
// Read-only
|
||||
|
||||
@@ -2784,7 +2784,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
|
||||
|
||||
if (!is_muted && !is_busy)
|
||||
{
|
||||
static LLCachedControl<bool> use_chat_bubbles("UseChatBubbles",false);
|
||||
static const LLCachedControl<bool> use_chat_bubbles("UseChatBubbles",false);
|
||||
visible_in_chat_bubble = use_chat_bubbles;
|
||||
((LLVOAvatar*)chatter)->addChat(chat);
|
||||
}
|
||||
|
||||
@@ -728,7 +728,7 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
|
||||
}
|
||||
}
|
||||
|
||||
static LLCachedControl<bool> freeze_time("FreezeTime",0);
|
||||
static const LLCachedControl<bool> freeze_time("FreezeTime",0);
|
||||
if (freeze_time)
|
||||
{
|
||||
for (std::vector<LLViewerObject*>::iterator iter = idle_list.begin();
|
||||
|
||||
@@ -518,7 +518,7 @@ public:
|
||||
ypos += y_inc;
|
||||
}
|
||||
// only display these messages if we are actually rendering beacons at this moment
|
||||
static LLCachedControl<bool> beacon_always_on("BeaconAlwaysOn",false);
|
||||
static const LLCachedControl<bool> beacon_always_on("BeaconAlwaysOn",false);
|
||||
if (LLPipeline::getRenderBeacons(NULL) && beacon_always_on)
|
||||
{
|
||||
if (LLPipeline::getRenderParticleBeacons(NULL))
|
||||
@@ -2285,7 +2285,7 @@ void LLViewerWindow::draw()
|
||||
//S32 screen_x, screen_y;
|
||||
|
||||
// HACK for timecode debugging
|
||||
static LLCachedControl<bool> display_timecode("DisplayTimecode",false);
|
||||
static const LLCachedControl<bool> display_timecode("DisplayTimecode",false);
|
||||
if (display_timecode)
|
||||
{
|
||||
// draw timecode block
|
||||
@@ -2763,7 +2763,7 @@ BOOL LLViewerWindow::handlePerFrameHover()
|
||||
|
||||
LLVector2 mouse_vel;
|
||||
|
||||
static LLCachedControl<bool> mouse_smooth("MouseSmooth",false);
|
||||
static const LLCachedControl<bool> mouse_smooth("MouseSmooth",false);
|
||||
if (mouse_smooth)
|
||||
{
|
||||
static F32 fdx = 0.f;
|
||||
@@ -2919,13 +2919,13 @@ BOOL LLViewerWindow::handlePerFrameHover()
|
||||
// Show a new tool tip (or update one that is alrady shown)
|
||||
BOOL tool_tip_handled = FALSE;
|
||||
std::string tool_tip_msg;
|
||||
static LLCachedControl<F32> tool_tip_delay("ToolTipDelay",.7f);
|
||||
static const LLCachedControl<F32> tool_tip_delay("ToolTipDelay",.7f);
|
||||
F32 tooltip_delay = tool_tip_delay;
|
||||
//HACK: hack for tool-based tooltips which need to pop up more quickly
|
||||
//Also for show xui names as tooltips debug mode
|
||||
if ((mouse_captor && !mouse_captor->isView()) || LLUI::sShowXUINames)
|
||||
{
|
||||
static LLCachedControl<F32> drag_and_drop_tool_tip_delay("DragAndDropToolTipDelay",.1f);
|
||||
static const LLCachedControl<F32> drag_and_drop_tool_tip_delay("DragAndDropToolTipDelay",.1f);
|
||||
tooltip_delay = drag_and_drop_tool_tip_delay;
|
||||
}
|
||||
if( handled &&
|
||||
@@ -2974,7 +2974,7 @@ BOOL LLViewerWindow::handlePerFrameHover()
|
||||
}
|
||||
}
|
||||
|
||||
static LLCachedControl<bool> freeze_time("FreezeTime",0);
|
||||
static const LLCachedControl<bool> freeze_time("FreezeTime",0);
|
||||
if (tool && tool != gToolNull && tool != LLToolCompInspect::getInstance() && tool != LLToolDragAndDrop::getInstance() && !freeze_time)
|
||||
{
|
||||
LLMouseHandler *captor = gFocusMgr.getMouseCapture();
|
||||
@@ -3116,7 +3116,7 @@ BOOL LLViewerWindow::handlePerFrameHover()
|
||||
gFloaterView->syncFloaterTabOrder();
|
||||
}
|
||||
|
||||
static LLCachedControl<bool> chat_bar_steals_focus("ChatBarStealsFocus",true);
|
||||
static const LLCachedControl<bool> chat_bar_steals_focus("ChatBarStealsFocus",true);
|
||||
if (chat_bar_steals_focus
|
||||
&& gChatBar
|
||||
&& gFocusMgr.getKeyboardFocus() == NULL
|
||||
@@ -3156,8 +3156,8 @@ BOOL LLViewerWindow::handlePerFrameHover()
|
||||
if ((previous_x != x) || (previous_y != y))
|
||||
mouse_moved_since_pick = TRUE;
|
||||
|
||||
static LLCachedControl<F32> picks_moving("PicksPerSecondMouseMoving",5.f);
|
||||
static LLCachedControl<F32> picks_stationary("PicksPerSecondMouseStationary",0.f);
|
||||
static const LLCachedControl<F32> picks_moving("PicksPerSecondMouseMoving",5.f);
|
||||
static const LLCachedControl<F32> picks_stationary("PicksPerSecondMouseStationary",0.f);
|
||||
if( !getCursorHidden()
|
||||
// When in-world media is in focus, pick every frame so that browser mouse-overs, dragging scrollbars, etc. work properly.
|
||||
&& (LLViewerMediaFocus::getInstance()->getFocus()
|
||||
@@ -5090,7 +5090,7 @@ LLRect LLViewerWindow::getChatConsoleRect()
|
||||
|
||||
console_rect.mLeft += CONSOLE_PADDING_LEFT;
|
||||
|
||||
static LLCachedControl<bool> chat_full_width("ChatFullWidth",true);
|
||||
static const LLCachedControl<bool> chat_full_width("ChatFullWidth",true);
|
||||
if (chat_full_width)
|
||||
{
|
||||
console_rect.mRight -= CONSOLE_PADDING_RIGHT;
|
||||
|
||||
@@ -763,6 +763,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
|
||||
mNameMute(FALSE),
|
||||
mRenderGroupTitles(sRenderGroupTitles),
|
||||
mNameAppearance(FALSE),
|
||||
mRenderTag(FALSE),
|
||||
mLastRegionHandle(0),
|
||||
mRegionCrossingCount(0),
|
||||
mFirstTEMessageReceived( FALSE ),
|
||||
@@ -3468,22 +3469,24 @@ void LLVOAvatar::getClientInfo(std::string& client, LLColor4& color, BOOL useCom
|
||||
if (!getTE(TEX_HEAD_BODYPAINT))
|
||||
return;
|
||||
std::string uuid_str = getTE(TEX_HEAD_BODYPAINT)->getID().asString(); //UUID of the head texture
|
||||
|
||||
static const LLCachedControl<LLColor4> avatar_name_color("AvatarNameColor",LLColor4(LLColor4U(251, 175, 93, 255)), gColors );
|
||||
if (mIsSelf)
|
||||
{
|
||||
BOOL showCustomTag = gCOASavedSettings->getBOOL("AscentUseCustomTag");
|
||||
if (!gSavedSettings.getBOOL("AscentShowSelfTagColor"))
|
||||
static const LLCachedCOAControl<bool> ascent_use_custom_tag("AscentUseCustomTag", false);
|
||||
static const LLCachedCOAControl<LLColor4> ascent_custom_tag_color("AscentCustomTagColor", LLColor4(.5f,1.f,.25f,1.f));
|
||||
static const LLCachedCOAControl<std::string> ascent_custom_tag_label("AscentCustomTagLabel","custom");
|
||||
static const LLCachedControl<bool> ascent_use_tag("AscentUseTag",true);
|
||||
static const LLCachedCOAControl<std::string> ascent_report_client_uuid("AscentReportClientUUID","8873757c-092a-98fb-1afd-ecd347566fcd");
|
||||
|
||||
if (ascent_use_custom_tag)
|
||||
{
|
||||
color = gColors.getColor( "AvatarNameColor" );
|
||||
color = ascent_custom_tag_color;
|
||||
client = ascent_custom_tag_label;
|
||||
return;
|
||||
}
|
||||
else if (showCustomTag)
|
||||
{
|
||||
color = gCOASavedSettings->getColor4("AscentCustomTagColor");
|
||||
client = gCOASavedSettings->getString("AscentCustomTagLabel");
|
||||
return;
|
||||
}
|
||||
else if (gSavedSettings.getBOOL("AscentUseTag"))
|
||||
uuid_str = gCOASavedSettings->getString("AscentReportClientUUID");
|
||||
else if (ascent_use_tag)
|
||||
uuid_str = ascent_report_client_uuid;
|
||||
}
|
||||
if(getTEImage(TEX_HEAD_BODYPAINT)->getID() == IMG_DEFAULT_AVATAR)
|
||||
{
|
||||
@@ -3523,7 +3526,7 @@ void LLVOAvatar::getClientInfo(std::string& client, LLColor4& color, BOOL useCom
|
||||
&& getTEImage(TEX_UPPER_BODYPAINT)->getID().asString() == "4934f1bf-3b1f-cf4f-dbdf-a72550d05bc6"
|
||||
&& getTEImage(TEX_LOWER_BODYPAINT)->getID().asString() == "4934f1bf-3b1f-cf4f-dbdf-a72550d05bc6")
|
||||
{
|
||||
color = gColors.getColor( "AvatarNameColor" );
|
||||
color = avatar_name_color;
|
||||
client = "?";
|
||||
}
|
||||
return;
|
||||
@@ -3557,17 +3560,12 @@ void LLVOAvatar::getClientInfo(std::string& client, LLColor4& color, BOOL useCom
|
||||
}
|
||||
else
|
||||
{
|
||||
color = gColors.getColor( "AvatarNameColor" );
|
||||
color = avatar_name_color;
|
||||
color.setAlpha(1.f);
|
||||
client = "?";
|
||||
//llinfos << "Apparently this tag isn't registered: " << uuid_str << llendl;
|
||||
}
|
||||
|
||||
if ((mIsSelf)&&(!gSavedSettings.getBOOL("AscentShowSelfTagColor")))
|
||||
{
|
||||
color = gColors.getColor( "AvatarNameColor" );
|
||||
}
|
||||
|
||||
if (false)
|
||||
//We'll remove this entirely eventually, but it's useful information if we're going to try for the new client tag idea. -HgB
|
||||
//if(useComment)
|
||||
@@ -3614,17 +3612,24 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
|
||||
}
|
||||
|
||||
const F32 time_visible = mTimeVisible.getElapsedTimeF32();
|
||||
static LLCachedControl<F32> NAME_SHOW_TIME("RenderNameShowTime",10); // seconds
|
||||
static LLCachedControl<F32> FADE_DURATION("RenderNameFadeDuration",1); // seconds
|
||||
static LLCachedControl<bool> use_chat_bubbles("UseChatBubbles",false);
|
||||
static LLCachedControl<bool> render_name_hide_self("RenderNameHideSelf",false);
|
||||
|
||||
static const LLCachedControl<F32> NAME_SHOW_TIME("RenderNameShowTime",10); // seconds
|
||||
static const LLCachedControl<F32> FADE_DURATION("RenderNameFadeDuration",1); // seconds
|
||||
static const LLCachedControl<bool> use_chat_bubbles("UseChatBubbles",false);
|
||||
static const LLCachedControl<bool> render_name_hide_self("RenderNameHideSelf",false);
|
||||
static const LLCachedControl<LLColor4> avatar_name_color("AvatarNameColor",LLColor4(LLColor4U(251, 175, 93, 255)), gColors );
|
||||
static const LLCachedControl<bool> ascent_show_self_tag("AscentShowSelfTag",true);
|
||||
static const LLCachedControl<bool> ascent_show_self_tag_color("AscentShowSelfTagColor",true);
|
||||
static const LLCachedControl<bool> ascent_show_others_tag("AscentShowOthersTag",true);
|
||||
static const LLCachedControl<bool> ascent_show_others_tag_color("AscentShowOthersTagColor",true);
|
||||
|
||||
BOOL visible_avatar = isVisible() || mNeedsAnimUpdate;
|
||||
BOOL visible_chat = use_chat_bubbles && (mChats.size() || mTyping);
|
||||
BOOL render_name = visible_chat ||
|
||||
(visible_avatar &&
|
||||
((sRenderName == RENDER_NAME_ALWAYS) ||
|
||||
(sRenderName == RENDER_NAME_FADE && time_visible < NAME_SHOW_TIME)));
|
||||
|
||||
BOOL tag_changed = FALSE;
|
||||
// If it's your own avatar, don't draw in mouselook, and don't
|
||||
// draw if we're specifically hiding our own name.
|
||||
if (mIsSelf)
|
||||
@@ -3649,10 +3654,6 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
|
||||
new_name = TRUE;
|
||||
}
|
||||
|
||||
|
||||
// <edit>
|
||||
std::string client;
|
||||
// </edit>
|
||||
// First Calculate Alpha
|
||||
// If alpha > 0, create mNameText if necessary, otherwise delete it
|
||||
{
|
||||
@@ -3692,11 +3693,10 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
|
||||
new_name = TRUE;
|
||||
}
|
||||
|
||||
LLColor4 avatar_name_color = gColors.getColor( "AvatarNameColor" );
|
||||
//As pointed out by Zwagoth, we really shouldn't be doing this per-frame. Skip if we already have the data. -HgB
|
||||
if (mClientTag == "")
|
||||
{
|
||||
mClientColor = gColors.getColor( "AvatarNameColor" );
|
||||
mClientColor = avatar_name_color;
|
||||
if(isFullyLoaded())
|
||||
{
|
||||
//Zwagoth's new client identification - HgB
|
||||
@@ -3722,65 +3722,73 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
|
||||
llinfos << "Using Emerald-style client identifier." << llendl;
|
||||
//The old client identification. Used only if the new method doesn't exist, so that it isn't automatically overwritten. -HgB
|
||||
getClientInfo(mClientTag,mClientColor);
|
||||
if(mClientTag == "")
|
||||
client = "?"; //prevent console spam..
|
||||
}
|
||||
if(mClientTag == "") //Failed to resolve. Don't try again unless something's changed.
|
||||
mClientTag = "?"; //prevent console spam..
|
||||
tag_changed = TRUE;
|
||||
}
|
||||
|
||||
// Overwrite the tag/color shit yet again if we want to see
|
||||
// friends in a special color. -- charbl
|
||||
if (LLAvatarTracker::instance().getBuddyInfo(this->getID()) != NULL)
|
||||
{
|
||||
if (gSavedSettings.getBOOL("AscentShowFriendsTag"))
|
||||
static const LLCachedControl<bool> ascent_show_friends_tag("AscentShowFriendsTag",true);
|
||||
if (ascent_show_friends_tag && LLAvatarTracker::instance().getBuddyInfo(this->getID()) != NULL)
|
||||
{
|
||||
mClientTag = "Friend";
|
||||
tag_changed = TRUE;
|
||||
}
|
||||
}
|
||||
if (!mIsSelf && gSavedSettings.getBOOL("AscentUseStatusColors"))
|
||||
if (!mIsSelf)
|
||||
{
|
||||
LLViewerRegion* parent_estate = LLWorld::getInstance()->getRegionFromPosGlobal(this->getPositionGlobal());
|
||||
LLUUID estate_owner = LLUUID::null;
|
||||
if(parent_estate && parent_estate->isAlive())
|
||||
static const LLCachedControl<bool> ascent_use_status_colors("AscentUseStatusColors",true);
|
||||
if ( ascent_use_status_colors)
|
||||
{
|
||||
estate_owner = parent_estate->getOwner();
|
||||
}
|
||||
|
||||
//Lindens are always more Linden than your friend, make that take precedence
|
||||
if(LLMuteList::getInstance()->isLinden(getFullname()))
|
||||
{
|
||||
mClientColor = gCOASavedSettings->getColor4("AscentLindenColor").getValue();
|
||||
}
|
||||
//check if they are an estate owner at their current position
|
||||
else if(estate_owner.notNull() && this->getID() == estate_owner)
|
||||
{
|
||||
mClientColor = gCOASavedSettings->getColor4("AscentEstateOwnerColor").getValue();
|
||||
}
|
||||
//without these dots, SL would suck.
|
||||
else if (LLAvatarTracker::instance().getBuddyInfo(this->getID()) != NULL)
|
||||
{
|
||||
mClientColor = gCOASavedSettings->getColor4("AscentFriendColor");
|
||||
}
|
||||
//big fat jerkface who is probably a jerk, display them as such.
|
||||
else if(LLMuteList::getInstance()->isMuted(this->getID()))
|
||||
{
|
||||
mClientColor = gCOASavedSettings->getColor4("AscentMutedColor").getValue();
|
||||
LLViewerRegion* parent_estate = LLWorld::getInstance()->getRegionFromPosGlobal(this->getPositionGlobal());
|
||||
LLUUID estate_owner = LLUUID::null;
|
||||
if(parent_estate && parent_estate->isAlive())
|
||||
{
|
||||
estate_owner = parent_estate->getOwner();
|
||||
}
|
||||
|
||||
//Lindens are always more Linden than your friend, make that take precedence
|
||||
if(LLMuteList::getInstance()->isLinden(getFullname()))
|
||||
{
|
||||
static const LLCachedCOAControl<LLColor4> ascent_linden_color("AscentLindenColor",LLColor4(0.f,0.f,1.f,1.f));
|
||||
mClientColor = ascent_linden_color;
|
||||
}
|
||||
//check if they are an estate owner at their current position
|
||||
else if(estate_owner.notNull() && this->getID() == estate_owner)
|
||||
{
|
||||
static const LLCachedCOAControl<LLColor4> ascent_estate_owner_color("AscentEstateOwnerColor",LLColor4(1.f,0.6f,1.f,1.f));
|
||||
mClientColor = ascent_estate_owner_color;
|
||||
}
|
||||
//without these dots, SL would suck.
|
||||
else if (LLAvatarTracker::instance().getBuddyInfo(this->getID()) != NULL)
|
||||
{
|
||||
static const LLCachedCOAControl<LLColor4> ascent_friend_color("AscentFriendColor",LLColor4(1.f,1.f,0.f,1.f));
|
||||
mClientColor = ascent_friend_color;
|
||||
}
|
||||
//big fat jerkface who is probably a jerk, display them as such.
|
||||
else if(LLMuteList::getInstance()->isMuted(this->getID()))
|
||||
{
|
||||
static const LLCachedCOAControl<LLColor4> ascent_muted_color("AscentMutedColor",LLColor4(0.7f,0.7f,0.7f,1.f));
|
||||
mClientColor = ascent_muted_color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
client = mClientTag;
|
||||
if ((mIsSelf && gSavedSettings.getBOOL("AscentShowSelfTagColor"))
|
||||
|| (!mIsSelf && gSavedSettings.getBOOL("AscentShowOthersTagColor")))
|
||||
avatar_name_color = mClientColor;
|
||||
|
||||
LLColor4 final_name_color(avatar_name_color);
|
||||
|
||||
avatar_name_color.setAlpha(alpha);
|
||||
if ( (mIsSelf && ascent_show_self_tag_color) || (!mIsSelf && ascent_show_others_tag_color) )
|
||||
final_name_color = mClientColor;
|
||||
|
||||
final_name_color.setAlpha(alpha);
|
||||
|
||||
//llinfos << "Show Self Tag is set to " << gSavedSettings.getBOOL("AscentShowSelfTagColor") << llendl;
|
||||
|
||||
mNameText->setColor(avatar_name_color);
|
||||
mNameText->setColor(final_name_color);
|
||||
|
||||
|
||||
LLQuaternion root_rot = mRoot.getWorldRotation();
|
||||
mNameText->setUsePixelSize(TRUE);
|
||||
LLVector3 pixel_right_vec;
|
||||
@@ -3822,16 +3830,10 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
|
||||
if(mNameBusy && ! is_busy) mIdleTimer.reset();
|
||||
BOOL is_appearance = mSignaledAnimations.find(ANIM_AGENT_CUSTOMIZE) != mSignaledAnimations.end();
|
||||
if(mNameAppearance && ! is_appearance) mIdleTimer.reset();
|
||||
BOOL is_muted;
|
||||
if (mIsSelf)
|
||||
{
|
||||
is_muted = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
is_muted = LLMuteList::getInstance()->isMuted(getID());
|
||||
|
||||
}
|
||||
BOOL is_muted = !mIsSelf && LLMuteList::getInstance()->isMuted(getID());
|
||||
|
||||
//Is client-tagging enabled for this av?
|
||||
BOOL render_tag = (((mIsSelf && ascent_show_self_tag) || (!mIsSelf && ascent_show_others_tag)));
|
||||
|
||||
if (mNameString.empty() ||
|
||||
new_name ||
|
||||
@@ -3839,13 +3841,12 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
|
||||
(title && mTitle != title->getString()) ||
|
||||
(is_away != mNameAway || is_busy != mNameBusy || is_muted != mNameMute)
|
||||
|| is_appearance != mNameAppearance
|
||||
|| client.length() ) // <edit>
|
||||
|| tag_changed //mClientTag was just set.
|
||||
|| (mRenderTag != render_tag) //tag setting is dirty. Need to update mNameString.
|
||||
)
|
||||
{
|
||||
std::string line;
|
||||
|
||||
|
||||
|
||||
|
||||
if (!sRenderGroupTitles)
|
||||
{
|
||||
// If all group titles are turned off, stack first name
|
||||
@@ -3868,24 +3869,14 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
|
||||
line += " ";
|
||||
line += lastname->getString();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
std::string additions;
|
||||
BOOL need_comma = FALSE;
|
||||
|
||||
if (client.length() || is_away || is_muted || is_busy)
|
||||
if (render_tag || is_away || is_muted || is_busy)
|
||||
{
|
||||
if ((client != "")&&(client != "?"))
|
||||
std::string additions;
|
||||
BOOL need_comma = FALSE;
|
||||
if (render_tag && !mClientTag.empty() && mClientTag != "?")
|
||||
{
|
||||
if ((mIsSelf && gSavedSettings.getBOOL("AscentShowSelfTag"))
|
||||
|| (!mIsSelf && gSavedSettings.getBOOL("AscentShowOthersTag")))
|
||||
{
|
||||
additions += client;
|
||||
need_comma = TRUE;
|
||||
}
|
||||
additions += mClientTag;
|
||||
need_comma = TRUE;
|
||||
}
|
||||
if (is_away)
|
||||
{
|
||||
@@ -3923,7 +3914,9 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
|
||||
line += "\n";
|
||||
line += "(Editing Appearance)";
|
||||
}
|
||||
if(!mIsSelf && mIdleTimer.getElapsedTimeF32() > 120 && gSavedSettings.getBOOL("AscentShowIdleTime"))
|
||||
|
||||
static const LLCachedControl<bool> ascent_show_idle_time("AscentShowIdleTime",true);
|
||||
if(!mIsSelf && ascent_show_idle_time && mIdleTimer.getElapsedTimeF32() > 120 )
|
||||
{
|
||||
line += "\n";
|
||||
line += getIdleTime();
|
||||
@@ -3933,6 +3926,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
|
||||
mNameBusy = is_busy;
|
||||
mNameMute = is_muted;
|
||||
mNameAppearance = is_appearance;
|
||||
mRenderTag = render_tag;
|
||||
mTitle = title ? title->getString() : "";
|
||||
LLStringFn::replace_ascii_controlchars(mTitle,LL_UNKNOWN_CHAR);
|
||||
mNameString = utf8str_to_wstring(line);
|
||||
@@ -3956,7 +3950,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
|
||||
std::deque<LLChat>::iterator chat_iter = mChats.begin();
|
||||
mNameText->clearString();
|
||||
|
||||
LLColor4 new_chat = gColors.getColor( "AvatarNameColor" );
|
||||
LLColor4 new_chat(avatar_name_color);
|
||||
LLColor4 normal_chat = lerp(new_chat, LLColor4(0.8f, 0.8f, 0.8f, 1.f), 0.7f);
|
||||
LLColor4 old_chat = lerp(normal_chat, LLColor4(0.6f, 0.6f, 0.6f, 1.f), 0.7f);
|
||||
if (mTyping && mChats.size() >= MAX_BUBBLE_CHAT_UTTERANCES)
|
||||
@@ -4018,7 +4012,8 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gSavedSettings.getBOOL("SmallAvatarNames"))
|
||||
static const LLCachedControl<bool> small_avatar_names("SmallAvatarNames",false);
|
||||
if (small_avatar_names)
|
||||
{
|
||||
mNameText->setFont(LLFontGL::getFontSansSerif());
|
||||
}
|
||||
|
||||
@@ -719,6 +719,7 @@ private:
|
||||
BOOL mNameBusy;
|
||||
BOOL mNameMute;
|
||||
BOOL mNameAppearance;
|
||||
BOOL mRenderTag;
|
||||
BOOL mVisibleChat;
|
||||
BOOL mRenderGroupTitles;
|
||||
|
||||
|
||||
@@ -5867,8 +5867,8 @@ void LLVoiceClient::setVoiceEnabled(bool enabled)
|
||||
|
||||
bool LLVoiceClient::voiceEnabled()
|
||||
{
|
||||
static LLCachedControl<bool> enable_voice_chat("EnableVoiceChat",false);
|
||||
static LLCachedControl<bool> cmd_line_disable_voice("CmdLineDisableVoice",false);
|
||||
static const LLCachedControl<bool> enable_voice_chat("EnableVoiceChat",false);
|
||||
static const LLCachedControl<bool> cmd_line_disable_voice("CmdLineDisableVoice",false);
|
||||
return enable_voice_chat && !cmd_line_disable_voice;
|
||||
}
|
||||
|
||||
|
||||
@@ -1023,7 +1023,7 @@ void LLVOSky::calcAtmospherics(void)
|
||||
|
||||
// Since WL scales everything by 2, there should always be at least a 2:1 brightness ratio
|
||||
// between sunlight and point lights in windlight to normalize point lights.
|
||||
static LLCachedControl<F32> render_sun_dynamic_range("RenderSunDynamicRange", 1);
|
||||
static const LLCachedControl<F32> render_sun_dynamic_range("RenderSunDynamicRange", 1);
|
||||
F32 sun_dynamic_range = llmax((float)render_sun_dynamic_range, 0.0001f);
|
||||
LLWLParamManager::instance()->mSceneLightStrength = 2.0f * (1.0f + sun_dynamic_range * dp);
|
||||
|
||||
|
||||
@@ -2220,8 +2220,8 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
|
||||
std::vector<LLFace*> alpha_faces;
|
||||
U32 useage = group->mSpatialPartition->mBufferUsage;
|
||||
|
||||
static LLCachedControl<S32> render_max_vbo_size("RenderMaxVBOSize", 512);
|
||||
static LLCachedControl<S32> render_max_node_size("RenderMaxNodeSize",8192);
|
||||
static const LLCachedControl<S32> render_max_vbo_size("RenderMaxVBOSize", 512);
|
||||
static const LLCachedControl<S32> render_max_node_size("RenderMaxNodeSize",8192);
|
||||
U32 max_vertices = (render_max_vbo_size*1024)/LLVertexBuffer::calcStride(group->mSpatialPartition->mVertexDataMask);
|
||||
U32 max_total = (render_max_node_size*1024)/LLVertexBuffer::calcStride(group->mSpatialPartition->mVertexDataMask);
|
||||
max_vertices = llmin(max_vertices, (U32) 65535);
|
||||
@@ -2503,7 +2503,7 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
|
||||
void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::vector<LLFace*>& faces, BOOL distance_sort)
|
||||
{
|
||||
//calculate maximum number of vertices to store in a single buffer
|
||||
static LLCachedControl<S32> render_max_vbo_size("RenderMaxVBOSize", 512);
|
||||
static const LLCachedControl<S32> render_max_vbo_size("RenderMaxVBOSize", 512);
|
||||
U32 max_vertices = (render_max_vbo_size*1024)/LLVertexBuffer::calcStride(group->mSpatialPartition->mVertexDataMask);
|
||||
max_vertices = llmin(max_vertices, (U32) 65535);
|
||||
|
||||
|
||||
@@ -655,8 +655,8 @@ void LLWorld::updateParticles()
|
||||
|
||||
void LLWorld::updateClouds(const F32 dt)
|
||||
{
|
||||
static LLCachedControl<bool> freeze_time("FreezeTime",false);
|
||||
static LLCachedControl<bool> sky_use_classic_clouds("SkyUseClassicClouds",false);
|
||||
static const LLCachedControl<bool> freeze_time("FreezeTime",false);
|
||||
static const LLCachedControl<bool> sky_use_classic_clouds("SkyUseClassicClouds",false);
|
||||
if (freeze_time ||
|
||||
!sky_use_classic_clouds)
|
||||
{
|
||||
|
||||
@@ -1020,7 +1020,7 @@ U32 LLPipeline::addObject(LLViewerObject *vobj)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static LLCachedControl<bool> render_delay_creation("RenderDelayCreation",false);
|
||||
static const LLCachedControl<bool> render_delay_creation("RenderDelayCreation",false);
|
||||
if (render_delay_creation)
|
||||
{
|
||||
mCreateQ.push_back(vobj);
|
||||
@@ -1084,7 +1084,7 @@ void LLPipeline::createObject(LLViewerObject* vobj)
|
||||
|
||||
markRebuild(drawablep, LLDrawable::REBUILD_ALL, TRUE);
|
||||
|
||||
static LLCachedControl<bool> render_animate_res("RenderAnimateRes",false);
|
||||
static const LLCachedControl<bool> render_animate_res("RenderAnimateRes",false);
|
||||
if (drawablep->getVOVolume() && render_animate_res)
|
||||
{
|
||||
// fun animated res
|
||||
@@ -1124,7 +1124,7 @@ void LLPipeline::resetFrameStats()
|
||||
//external functions for asynchronous updating
|
||||
void LLPipeline::updateMoveDampedAsync(LLDrawable* drawablep)
|
||||
{
|
||||
static LLCachedControl<bool> freeze_time("FreezeTime",false);
|
||||
static const LLCachedControl<bool> freeze_time("FreezeTime",false);
|
||||
if (freeze_time)
|
||||
{
|
||||
return;
|
||||
@@ -1155,7 +1155,7 @@ void LLPipeline::updateMoveDampedAsync(LLDrawable* drawablep)
|
||||
|
||||
void LLPipeline::updateMoveNormalAsync(LLDrawable* drawablep)
|
||||
{
|
||||
static LLCachedControl<bool> freeze_time("FreezeTime",false);
|
||||
static const LLCachedControl<bool> freeze_time("FreezeTime",false);
|
||||
if (freeze_time)
|
||||
{
|
||||
return;
|
||||
@@ -1209,7 +1209,7 @@ void LLPipeline::updateMove()
|
||||
LLFastTimer t(LLFastTimer::FTM_UPDATE_MOVE);
|
||||
LLMemType mt(LLMemType::MTYPE_PIPELINE);
|
||||
|
||||
static LLCachedControl<bool> freeze_time("FreezeTime",false);
|
||||
static const LLCachedControl<bool> freeze_time("FreezeTime",false);
|
||||
if (freeze_time)
|
||||
{
|
||||
return;
|
||||
@@ -2301,7 +2301,7 @@ void LLPipeline::postSort(LLCamera& camera)
|
||||
}
|
||||
|
||||
// only render if the flag is set. The flag is only set if we are in edit mode or the toggle is set in the menus
|
||||
static LLCachedControl<bool> beacon_always_on("BeaconAlwaysOn",false);
|
||||
static const LLCachedControl<bool> beacon_always_on("BeaconAlwaysOn",false);
|
||||
if (beacon_always_on && !sShadowRender)
|
||||
{
|
||||
if (sRenderScriptedTouchBeacons)
|
||||
@@ -5424,14 +5424,14 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index)
|
||||
}
|
||||
|
||||
shader.uniform4fv("shadow_clip", 1, mSunClipPlanes.mV);
|
||||
static LLCachedControl<F32> render_deferred_sun_wash("RenderDeferredSunWash",.5f);
|
||||
static LLCachedControl<F32> render_shadow_noise("RenderShadowNoise",-.0001f);
|
||||
static LLCachedControl<F32> render_shadow_blur_size("RenderShadowBlurSize",.7f);
|
||||
static LLCachedControl<F32> render_ssao_scale("RenderSSAOScale",500);
|
||||
static LLCachedControl<S32> render_ssao_max_scale("RenderSSAOMaxScale",60);
|
||||
static LLCachedControl<F32> render_ssao_factor("RenderSSAOFactor",.3f);
|
||||
static LLCachedControl<LLVector3> render_ssao_effect("RenderSSAOEffect",LLVector3(.4f,1,0));
|
||||
static LLCachedControl<F32> render_deferred_alpha_soft("RenderDeferredAlphaSoften",.75f);
|
||||
static const LLCachedControl<F32> render_deferred_sun_wash("RenderDeferredSunWash",.5f);
|
||||
static const LLCachedControl<F32> render_shadow_noise("RenderShadowNoise",-.0001f);
|
||||
static const LLCachedControl<F32> render_shadow_blur_size("RenderShadowBlurSize",.7f);
|
||||
static const LLCachedControl<F32> render_ssao_scale("RenderSSAOScale",500);
|
||||
static const LLCachedControl<S32> render_ssao_max_scale("RenderSSAOMaxScale",60);
|
||||
static const LLCachedControl<F32> render_ssao_factor("RenderSSAOFactor",.3f);
|
||||
static const LLCachedControl<LLVector3> render_ssao_effect("RenderSSAOEffect",LLVector3(.4f,1,0));
|
||||
static const LLCachedControl<F32> render_deferred_alpha_soft("RenderDeferredAlphaSoften",.75f);
|
||||
|
||||
shader.uniform1f("sun_wash", render_deferred_sun_wash);
|
||||
shader.uniform1f("shadow_noise", render_shadow_noise);
|
||||
|
||||
Reference in New Issue
Block a user