From 0d4f52b7783706d988ec2c022be24ef9880f318a Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Mon, 15 Apr 2024 22:56:53 +0200 Subject: secondlife/viewer#1200 Avatar rotates 360 degrees when viewed from the top and below --- indra/newview/llagent.cpp | 83 +++++++++++++++++++++++++++++------------------ 1 file changed, 51 insertions(+), 32 deletions(-) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 13501833b2..192bd9cccd 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1453,48 +1453,67 @@ LLVector3 LLAgent::getReferenceUpVector() return up_vector; } - // Radians, positive is forward into ground //----------------------------------------------------------------------------- // pitch() //----------------------------------------------------------------------------- void LLAgent::pitch(F32 angle) { - // don't let user pitch if pointed almost all the way down or up + if (fabs(angle) <= 1e-4) + return; - // A dot B = mag(A) * mag(B) * cos(angle between A and B) - // so... cos(angle between A and B) = A dot B / mag(A) / mag(B) - // = A dot B for unit vectors + LLCoordFrame newCoordFrame(mFrameAgent); + newCoordFrame.pitch(angle); - LLVector3 skyward = getReferenceUpVector(); + // don't let user pitch if rotated 180 degree around the vertical axis + if ((newCoordFrame.getXAxis()[VX] * mFrameAgent.getXAxis()[VX] < 0) && + (newCoordFrame.getXAxis()[VY] * mFrameAgent.getXAxis()[VY] < 0)) + return; - // clamp pitch to limits - if (angle >= 0.f) - { - const F32 look_down_limit = 179.f * DEG_TO_RAD; - F32 angle_from_skyward = acos(mFrameAgent.getAtAxis() * skyward); - if (angle_from_skyward + angle > look_down_limit) - { - angle = look_down_limit - angle_from_skyward; - } - } - else if (angle < 0.f) - { - const F32 look_up_limit = 5.f * DEG_TO_RAD; - const LLVector3& viewer_camera_pos = LLViewerCamera::getInstance()->getOrigin(); - LLVector3 agent_focus_pos = getPosAgentFromGlobal(gAgentCamera.calcFocusPositionTargetGlobal()); - LLVector3 look_dir = agent_focus_pos - viewer_camera_pos; - F32 angle_from_skyward = angle_between(look_dir, skyward); - if (angle_from_skyward + angle < look_up_limit) - { - angle = look_up_limit - angle_from_skyward; - } - } + // don't let user pitch if pointed almost all the way down or up + LLVector3 skyward = getReferenceUpVector(); - if (fabs(angle) > 1e-4) - { - mFrameAgent.pitch(angle); - } + // A dot B = mag(A) * mag(B) * cos(angle between A and B) + // so... cos(angle between A and B) = A dot B / mag(A) / mag(B) + // = A dot B for unit vectors + F32 agent_camera_angle_from_skyward = acos(newCoordFrame.getAtAxis() * skyward) * RAD_TO_DEG; + + F32 min_angle = 1; + F32 max_angle = 179; + bool check_viewer_camera = false; + + if (gAgentCamera.getCameraMode() == CAMERA_MODE_THIRD_PERSON) + { + // These values of min_angle and max_angle are obtained purely empirically + if (gAgentCamera.getCameraPreset() == CAMERA_PRESET_REAR_VIEW) + { + min_angle = 10; + check_viewer_camera = true; + } + else if (gAgentCamera.getCameraPreset() == CAMERA_PRESET_GROUP_VIEW) + { + min_angle = 10; + max_angle = 170; + check_viewer_camera = true; + } + } + + if ((angle < 0 && agent_camera_angle_from_skyward < min_angle) || + (angle > 0 && agent_camera_angle_from_skyward > max_angle)) + return; + + if (check_viewer_camera) + { + const LLVector3& viewer_camera_pos = LLViewerCamera::getInstance()->getOrigin(); + LLVector3 agent_focus_pos = getPosAgentFromGlobal(gAgentCamera.calcFocusPositionTargetGlobal()); + LLVector3 look_dir = agent_focus_pos - viewer_camera_pos; + F32 viewer_camera_angle_from_skyward = angle_between(look_dir, skyward) * RAD_TO_DEG; + if ((angle < 0 && viewer_camera_angle_from_skyward < min_angle) || + (angle > 0 && viewer_camera_angle_from_skyward > max_angle)) + return; + } + + mFrameAgent = newCoordFrame; } -- cgit v1.2.3 From 2f600d8ad641012052dce3452b815b412d2d7b58 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Thu, 16 May 2024 13:17:19 +0200 Subject: secondlife/jira-archive-internal#71144 Mouselook no longer allows pitch upwards to full 90 degrees --- indra/newview/llagent.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index af6ccb7850..c3643dcc62 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1497,6 +1497,11 @@ void LLAgent::pitch(F32 angle) check_viewer_camera = true; } } + else if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK) + { + min_angle = 0.1; + max_angle = 179.9; + } if ((angle < 0 && agent_camera_angle_from_skyward < min_angle) || (angle > 0 && agent_camera_angle_from_skyward > max_angle)) -- cgit v1.2.3 From 3fc8d4b232a60931849e674b48273eb07157b4e1 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Thu, 6 Jun 2024 12:10:10 +0200 Subject: #1611 Regression in anti-flipping mechanism for mouselook camera --- indra/newview/llagent.cpp | 98 +++++++++++++++++++++++------------------------ 1 file changed, 47 insertions(+), 51 deletions(-) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index c3643dcc62..25a3690162 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1459,69 +1459,65 @@ LLVector3 LLAgent::getReferenceUpVector() //----------------------------------------------------------------------------- void LLAgent::pitch(F32 angle) { - if (fabs(angle) <= 1e-4) - return; - - LLCoordFrame newCoordFrame(mFrameAgent); - newCoordFrame.pitch(angle); - - // don't let user pitch if rotated 180 degree around the vertical axis - if ((newCoordFrame.getXAxis()[VX] * mFrameAgent.getXAxis()[VX] < 0) && - (newCoordFrame.getXAxis()[VY] * mFrameAgent.getXAxis()[VY] < 0)) - return; - - // don't let user pitch if pointed almost all the way down or up - LLVector3 skyward = getReferenceUpVector(); + if (gAgentCamera.getCameraMode() == CAMERA_MODE_THIRD_PERSON || + gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK) + { + // Backup the current orientation + LLCoordFrame saved_frame_agent(mFrameAgent); - // A dot B = mag(A) * mag(B) * cos(angle between A and B) - // so... cos(angle between A and B) = A dot B / mag(A) / mag(B) - // = A dot B for unit vectors - F32 agent_camera_angle_from_skyward = acos(newCoordFrame.getAtAxis() * skyward) * RAD_TO_DEG; + // Optimistic rotation up/down (vertical angle can reach and exceed 0 or 180) + mFrameAgent.pitch(angle); - F32 min_angle = 1; - F32 max_angle = 179; - bool check_viewer_camera = false; + // Cosine of the angle between current agent At and Up directions + F32 agent_at_to_up_now_cos = saved_frame_agent.mXAxis * gAgentCamera.getCameraUpVector(); + bool pitch_away_from_horizont = (angle < 0) ^ (agent_at_to_up_now_cos < 0); + // We always allow to pitch in direction to horizont (from zenith or from nadir) + if (!pitch_away_from_horizont) + return; - if (gAgentCamera.getCameraMode() == CAMERA_MODE_THIRD_PERSON) - { - // These values of min_angle and max_angle are obtained purely empirically - if (gAgentCamera.getCameraPreset() == CAMERA_PRESET_REAR_VIEW) + // Current angle between agent At and Up directions + F32 agent_at_to_up_now = acos(agent_at_to_up_now_cos); + // Requested angle between agent At and Up directions + F32 agent_at_to_up_new = agent_at_to_up_now + angle; + F32 agent_at_to_up_new_sin = sin(agent_at_to_up_new); + // Overpitched? Then rollback + if (agent_at_to_up_new_sin < 1e-4) { - min_angle = 10; - check_viewer_camera = true; + mFrameAgent = saved_frame_agent; + return; } - else if (gAgentCamera.getCameraPreset() == CAMERA_PRESET_GROUP_VIEW) + + if (gAgentCamera.getCameraMode() == CAMERA_MODE_THIRD_PERSON || + (isAgentAvatarValid() && gAgentAvatarp->getParent())) { - min_angle = 10; - max_angle = 170; - check_viewer_camera = true; + // Camera sight relative to agent frame (focus - offset) + LLVector3 camera_offset(gAgentCamera.getCameraOffsetInitial()); + LLVector3 camera_focus(gAgentCamera.getFocusOffsetInitial()); + LLVector3 camera_sight(camera_focus - camera_offset); + // 2D projection of the camera sight to the XZ plane + LLVector2 camera_sight_2d_vert(1, camera_sight[VZ]); + camera_sight_2d_vert.normalize(); + // Cosine of the 2D angle between initial camera At and X axis (in the XZ plane) + F32 camera_sight_to_at_2d_vert_cos = camera_sight_2d_vert * LLVector2(LLVector3::x_axis); + F32 camera_sight_to_at_2d_vert = acos(camera_sight_to_at_2d_vert_cos); + // Requested angle between camera At and Up directions + F32 camera_at_to_up_new = agent_at_to_up_new - camera_sight_to_at_2d_vert; + F32 camera_at_to_up_new_sin = sin(camera_at_to_up_new); + // Overpitched? Then rollback + if (camera_at_to_up_new_sin < 1e-4) + { + mFrameAgent = saved_frame_agent; + return; + } } } - else if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK) - { - min_angle = 0.1; - max_angle = 179.9; - } - - if ((angle < 0 && agent_camera_angle_from_skyward < min_angle) || - (angle > 0 && agent_camera_angle_from_skyward > max_angle)) - return; - - if (check_viewer_camera) + else { - const LLVector3& viewer_camera_pos = LLViewerCamera::getInstance()->getOrigin(); - LLVector3 agent_focus_pos = getPosAgentFromGlobal(gAgentCamera.calcFocusPositionTargetGlobal()); - LLVector3 look_dir = agent_focus_pos - viewer_camera_pos; - F32 viewer_camera_angle_from_skyward = angle_between(look_dir, skyward) * RAD_TO_DEG; - if ((angle < 0 && viewer_camera_angle_from_skyward < min_angle) || - (angle > 0 && viewer_camera_angle_from_skyward > max_angle)) - return; + // No limitations in other modes + mFrameAgent.pitch(angle); } - - mFrameAgent = newCoordFrame; } - //----------------------------------------------------------------------------- // roll() //----------------------------------------------------------------------------- -- cgit v1.2.3 From 3d84a147f0ae781a71f74d9d7ad0b07f9b1ccb43 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Fri, 14 Jun 2024 08:06:31 +0200 Subject: #1611 Regression in anti-flipping mechanism for mouselook camera --- indra/newview/llagent.cpp | 68 +++++++++++++---------------------------------- 1 file changed, 19 insertions(+), 49 deletions(-) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 25a3690162..8e15a08373 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -222,7 +222,6 @@ private: LLVector3d mPosGlobal; }; - class LLTeleportRequestViaLocationLookAt : public LLTeleportRequestViaLocation { public: @@ -844,7 +843,6 @@ void LLAgent::movePitch(F32 mag) } } - // Does this parcel allow you to fly? BOOL LLAgent::canFly() { @@ -926,7 +924,6 @@ void LLAgent::setFlying(BOOL fly, BOOL fail_sound) mbFlagsDirty = TRUE; } - // UI based mechanism of setting fly state //----------------------------------------------------------------------------- // toggleFlying() @@ -1005,7 +1002,6 @@ void LLAgent::capabilityReceivedCallback(const LLUUID ®ion_id, LLViewerRegion } } - //----------------------------------------------------------------------------- // setRegion() //----------------------------------------------------------------------------- @@ -1112,7 +1108,6 @@ void LLAgent::setRegion(LLViewerRegion *regionp) mRegionChangedSignal(); } - //----------------------------------------------------------------------------- // getRegion() //----------------------------------------------------------------------------- @@ -1121,7 +1116,6 @@ LLViewerRegion *LLAgent::getRegion() const return mRegionp; } - LLHost LLAgent::getRegionHost() const { if (mRegionp) @@ -1152,7 +1146,6 @@ BOOL LLAgent::inPrelude() return mRegionp && mRegionp->isPrelude(); } - std::string LLAgent::getRegionCapability(const std::string &name) { if (!mRegionp) @@ -1161,7 +1154,6 @@ std::string LLAgent::getRegionCapability(const std::string &name) return mRegionp->getCapability(name); } - //----------------------------------------------------------------------------- // canManageEstate() //----------------------------------------------------------------------------- @@ -1189,7 +1181,6 @@ void LLAgent::sendMessage() gMessageSystem->sendMessage(mRegionp->getHost()); } - //----------------------------------------------------------------------------- // sendReliableMessage() //----------------------------------------------------------------------------- @@ -1223,7 +1214,6 @@ LLVector3 LLAgent::getVelocity() const } } - //----------------------------------------------------------------------------- // setPositionAgent() //----------------------------------------------------------------------------- @@ -1292,12 +1282,11 @@ const LLVector3 &LLAgent::getPositionAgent() mFrameAgent.setOrigin(gAgentAvatarp->getPositionAgent()); } else - { - mFrameAgent.setOrigin(gAgentAvatarp->getRenderPosition()); - } + { + mFrameAgent.setOrigin(gAgentAvatarp->getRenderPosition()); + } } - return mFrameAgent.getOrigin(); } @@ -1306,7 +1295,6 @@ boost::signals2::connection LLAgent::whenPositionChanged(position_signal_t::slot return mOnPositionChanged.connect(fn); } - //----------------------------------------------------------------------------- // getRegionsVisited() //----------------------------------------------------------------------------- @@ -1323,7 +1311,6 @@ F64 LLAgent::getDistanceTraveled() const return mDistanceTraveled; } - //----------------------------------------------------------------------------- // getPosAgentFromGlobal() //----------------------------------------------------------------------------- @@ -1334,7 +1321,6 @@ LLVector3 LLAgent::getPosAgentFromGlobal(const LLVector3d &pos_global) const return pos_agent; } - //----------------------------------------------------------------------------- // getPosGlobalFromAgent() //----------------------------------------------------------------------------- @@ -1350,7 +1336,6 @@ void LLAgent::sitDown() setControlFlags(AGENT_CONTROL_SIT_ON_GROUND); } - //----------------------------------------------------------------------------- // resetAxes() //----------------------------------------------------------------------------- @@ -1359,7 +1344,6 @@ void LLAgent::resetAxes() mFrameAgent.resetAxes(); } - // Copied from LLCamera::setOriginAndLookAt // Look_at must be unit vector //----------------------------------------------------------------------------- @@ -1388,7 +1372,6 @@ void LLAgent::resetAxes(const LLVector3 &look_at) mFrameAgent.setAxes(look_at, left, up); } - //----------------------------------------------------------------------------- // rotate() //----------------------------------------------------------------------------- @@ -1397,7 +1380,6 @@ void LLAgent::rotate(F32 angle, const LLVector3 &axis) mFrameAgent.rotate(angle, axis); } - //----------------------------------------------------------------------------- // rotate() //----------------------------------------------------------------------------- @@ -1406,7 +1388,6 @@ void LLAgent::rotate(F32 angle, F32 x, F32 y, F32 z) mFrameAgent.rotate(angle, x, y, z); } - //----------------------------------------------------------------------------- // rotate() //----------------------------------------------------------------------------- @@ -1415,7 +1396,6 @@ void LLAgent::rotate(const LLMatrix3 &matrix) mFrameAgent.rotate(matrix); } - //----------------------------------------------------------------------------- // rotate() //----------------------------------------------------------------------------- @@ -1424,7 +1404,6 @@ void LLAgent::rotate(const LLQuaternion &quaternion) mFrameAgent.rotate(quaternion); } - //----------------------------------------------------------------------------- // getReferenceUpVector() //----------------------------------------------------------------------------- @@ -1526,7 +1505,6 @@ void LLAgent::roll(F32 angle) mFrameAgent.roll(angle); } - //----------------------------------------------------------------------------- // yaw() //----------------------------------------------------------------------------- @@ -1538,7 +1516,6 @@ void LLAgent::yaw(F32 angle) } } - // Returns a quat that represents the rotation of the agent in the absolute frame //----------------------------------------------------------------------------- // getQuat() @@ -1565,7 +1542,6 @@ void LLAgent::setControlFlags(U32 mask) mbFlagsDirty = TRUE; } - //----------------------------------------------------------------------------- // clearControlFlags() //----------------------------------------------------------------------------- @@ -1679,7 +1655,6 @@ bool LLAgent::isDoNotDisturb() const return mIsDoNotDisturb; } - //----------------------------------------------------------------------------- // startAutoPilotGlobal() //----------------------------------------------------------------------------- @@ -1785,7 +1760,6 @@ void LLAgent::startAutoPilotGlobal( mAutoPilotNoProgressFrameCount = 0; } - //----------------------------------------------------------------------------- // setAutoPilotTargetGlobal //----------------------------------------------------------------------------- @@ -1839,7 +1813,6 @@ void LLAgent::startFollowPilot(const LLUUID &leader_id, BOOL allow_flying, F32 s allow_flying); } - //----------------------------------------------------------------------------- // stopAutoPilot() //----------------------------------------------------------------------------- @@ -1881,7 +1854,6 @@ void LLAgent::stopAutoPilot(BOOL user_cancel) } } - // Returns necessary agent pitch and yaw changes, radians. //----------------------------------------------------------------------------- // autoPilot() @@ -2070,7 +2042,6 @@ void LLAgent::autoPilot(F32 *delta_yaw) } } - //----------------------------------------------------------------------------- // propagate() //----------------------------------------------------------------------------- @@ -2091,11 +2062,20 @@ void LLAgent::propagate(const F32 dt) } // handle rotation based on keyboard levels - const F32 YAW_RATE = 90.f * DEG_TO_RAD; // radians per second - yaw(YAW_RATE * gAgentCamera.getYawKey() * dt); + if (fabs(dt) > 1e-6) + { + if (fabs(gAgentCamera.getYawKey()) > 1e-6) + { + static const F32 YAW_RATE = 90.f * DEG_TO_RAD; // radians per second + yaw(YAW_RATE * gAgentCamera.getYawKey() * dt); + } - const F32 PITCH_RATE = 90.f * DEG_TO_RAD; // radians per second - pitch(PITCH_RATE * gAgentCamera.getPitchKey() * dt); + if (fabs(gAgentCamera.getPitchKey()) > 1e-6) + { + static const F32 PITCH_RATE = 90.f * DEG_TO_RAD; // radians per second + pitch(PITCH_RATE * gAgentCamera.getPitchKey() * dt); + } + } // handle auto-land behavior if (isAgentAvatarValid()) @@ -2256,7 +2236,6 @@ void LLAgent::clearRenderState(U8 clearstate) mRenderState &= ~clearstate; } - //----------------------------------------------------------------------------- // getRenderState() //----------------------------------------------------------------------------- @@ -2298,6 +2277,7 @@ void LLAgent::endAnimationUpdateUI() { return; } + if (gAgentCamera.getCameraMode() == gAgentCamera.getLastCameraMode()) { // We're already done endAnimationUpdateUI for this transition. @@ -2363,9 +2343,8 @@ void LLAgent::endAnimationUpdateUI() mViewsPushed = FALSE; } - gAgentCamera.setLookAt(LOOKAT_TARGET_CLEAR); - if( gMorphView ) + if (gMorphView) { gMorphView->setVisible( FALSE ); } @@ -2373,7 +2352,7 @@ void LLAgent::endAnimationUpdateUI() // Disable mouselook-specific animations if (isAgentAvatarValid()) { - if( gAgentAvatarp->isAnyAnimationSignaled(AGENT_GUN_AIM_ANIMS, NUM_AGENT_GUN_AIM_ANIMS) ) + if (gAgentAvatarp->isAnyAnimationSignaled(AGENT_GUN_AIM_ANIMS, NUM_AGENT_GUN_AIM_ANIMS)) { if (gAgentAvatarp->mSignaledAnimations.find(ANIM_AGENT_AIM_RIFLE_R) != gAgentAvatarp->mSignaledAnimations.end()) { @@ -2992,7 +2971,6 @@ void LLAgent::sendMaturityPreferenceToServer(U8 pPreferredMaturity) } } - void LLAgent::processMaturityPreferenceFromServer(const LLSD &result, U8 perferredMaturity) { U8 maturity = SIM_ACCESS_MIN; @@ -3062,7 +3040,6 @@ void LLAgent::changeInterestListMode(const std::string &new_mode) } } - bool LLAgent::requestPostCapability(const std::string &capName, LLSD &postData, httpCallback_t cbSuccess, httpCallback_t cbFailure) { if (getRegion()) @@ -3390,7 +3367,6 @@ void LLAgent::sendAnimationStateReset() sendReliableMessage(); } - // Send a message to the region to revoke sepecified permissions on ALL scripts in the region // If the target is an object in the region, permissions in scripts on that object are cleared. // If it is the region ID, all scripts clear the permissions for this agent @@ -4324,7 +4300,6 @@ void LLAgent::onCapabilitiesReceivedAfterTeleport() check_merchant_status(); } - void LLAgent::teleportRequest( const U64& region_handle, const LLVector3& pos_local, @@ -4424,7 +4399,6 @@ void LLAgent::doTeleportViaLure(const LLUUID& lure_id, BOOL godlike) } } - // James Cook, July 28, 2005 void LLAgent::teleportCancel() { @@ -4549,7 +4523,6 @@ LLAgent::ETeleportState LLAgent::getTeleportState() const TELEPORT_NONE : mTeleportState; } - void LLAgent::setTeleportState(ETeleportState state) { if (mTeleportRequest && (state != TELEPORT_NONE) && (mTeleportRequest->getStatus() == LLTeleportRequest::kFailed)) @@ -4594,7 +4567,6 @@ void LLAgent::setTeleportState(ETeleportState state) } } - void LLAgent::stopCurrentAnimations() { LL_DEBUGS("Avatar") << "Stopping current animations" << LL_ENDL; @@ -4709,7 +4681,6 @@ void LLAgent::stopFidget() gAgent.sendAnimationRequests(anims, ANIM_REQUEST_STOP); } - void LLAgent::requestEnterGodMode() { LLMessageSystem* msg = gMessageSystem; @@ -4830,7 +4801,6 @@ void LLAgent::sendAgentUpdateUserInfo(const std::string& directory_visibility) } } - void LLAgent::updateAgentUserInfoCoro(std::string capurl, std::string directory_visibility) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); -- cgit v1.2.3 From 8ae0e6c07a8272c04d8a0f122e6204cf24f547af Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 25 Jul 2024 16:15:18 +0300 Subject: viewer#2102 Update feature notification to notify about Favorites and remove old notifications --- indra/newview/llagent.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 8e15a08373..95ba14dda7 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -120,8 +120,8 @@ const F32 MIN_FIDGET_TIME = 8.f; // seconds const F32 MAX_FIDGET_TIME = 20.f; // seconds const S32 UI_FEATURE_VERSION = 1; -// For version 1: 1 - inventory, 2 - gltf -const S32 UI_FEATURE_FLAGS = 3; +// For version 1, flag holds: 1 - inventory thumbnails, 2 - gltf, 4 - inventory favorites +const S32 UI_FEATURE_FLAGS = 7; // The agent instance. LLAgent gAgent; @@ -604,7 +604,7 @@ void LLAgent::getFeatureVersionAndFlags(S32& version, S32& flags) if (feature_version.isInteger()) { version = feature_version.asInteger(); - flags = 1; // inventory flag + flags = 3; // show 'favorites' notification } else if (feature_version.isMap()) { @@ -630,13 +630,8 @@ void LLAgent::showLatestFeatureNotification(const std::string key) if (key == "inventory") { - // Notify user about new thumbnail support - flag = 1; - } - - if (key == "gltf") - { - flag = 2; + // Notify user about new favorites support + flag = 4; } if ((flags & flag) == 0) -- cgit v1.2.3