-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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user