From eb6153d2c3cb1e2105804e28f81f894873315545 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Mon, 12 Jul 2010 19:47:44 +0300 Subject: EXT-7796 FIXED disabling/enabling presets and camera modes on switching to/from camera customize mode Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/732/ --HG-- branch : product-engine --- indra/newview/llagent.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 4e5fdb1219..92c2570c33 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1785,6 +1785,8 @@ void LLAgent::endAnimationUpdateUI() } gAgentCamera.setLookAt(LOOKAT_TARGET_CLEAR); + + LLFloaterCamera::onAvatarEditingAppearance(false); } //--------------------------------------------------------------------- @@ -1891,6 +1893,8 @@ void LLAgent::endAnimationUpdateUI() { mPauseRequest = gAgentAvatarp->requestPause(); } + + LLFloaterCamera::onAvatarEditingAppearance(true); } if (isAgentAvatarValid()) -- cgit v1.2.3 From 2fea1d5d33ec1b41a3cfa4307a1bfa58d8014f88 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 19 Aug 2010 12:25:15 -0500 Subject: Integrate SIMD API from oreh/server-trunk-oreh --- indra/newview/llagent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 72d51540ef..5fae5b893f 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1210,7 +1210,7 @@ void LLAgent::startAutoPilotGlobal(const LLVector3d &target_global, const std::s else { // Guess at a reasonable stop distance. - mAutoPilotStopDistance = fsqrtf( distance ); + mAutoPilotStopDistance = (F32) sqrt( distance ); if (mAutoPilotStopDistance < 0.5f) { mAutoPilotStopDistance = 0.5f; -- cgit v1.2.3 From 90e3d83a5cb35e98a02a3017dd79ebc272bbfe85 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 21 Sep 2010 13:26:52 -0400 Subject: Fix for build failures - disabling tcmalloc for now --- indra/newview/llagent.cpp | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 indra/newview/llagent.cpp (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp old mode 100644 new mode 100755 -- cgit v1.2.3 From e045d212d35354d679c2d2e05c6d4689f9f8ac95 Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Mon, 27 Sep 2010 22:56:08 -0400 Subject: STORM-1126 WIP Windlight Estate Settings port from 1.23: first pass at merging in windlight estate settings to viewer-dev codebase. not built, not tested. Probably needs a bunch of fixes to be able to be integrated. (resubmitted by Vadim ProductEngine) --- indra/newview/llagent.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index c9bd7851ed..56d2c76dc7 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -36,8 +36,10 @@ #include "llanimationstates.h" #include "llbottomtray.h" #include "llcallingcard.h" +#include "llcapabilitylistener.h" #include "llchannelmanager.h" #include "llconsole.h" +#include "llenvmanager.h" #include "llfirstuse.h" #include "llfloatercamera.h" #include "llfloaterreg.h" @@ -76,6 +78,7 @@ #include "llwindow.h" #include "llworld.h" #include "llworldmap.h" +#include "stringize.h" using namespace LLVOAvatarDefines; @@ -620,6 +623,16 @@ void LLAgent::setRegion(LLViewerRegion *regionp) gSky.mVOGroundp->setRegion(regionp); } + // Notify windlight managers + bool teleport = (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE); + if (teleport) + { + LLEnvManager::getInstance()->notifyTP(); + } + else + { + LLEnvManager::getInstance()->notifyCrossing(); + } } else { @@ -636,6 +649,9 @@ void LLAgent::setRegion(LLViewerRegion *regionp) // Update all of the regions. LLWorld::getInstance()->updateAgentOffset(mAgentOriginGlobal); + + // Notify windlight managers about login + LLEnvManager::getInstance()->notifyLogin(); } } mRegionp = regionp; @@ -653,6 +669,9 @@ void LLAgent::setRegion(LLViewerRegion *regionp) LLSelectMgr::getInstance()->updateSelectionCenter(); LLFloaterMove::sUpdateFlyingStatus(); + + // notify EnvManager that a refresh is needed + LLEnvManager::instance().refreshFromStorage(LLEnvKey::SCOPE_REGION); } -- cgit v1.2.3 From a5619d16f74863168f45b04b37cc6383e1a92263 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 13 Oct 2010 07:24:37 -0400 Subject: correct licenses (fix problem with license change merge) --- indra/newview/llagent.cpp | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index a44b970f36..da3ee7cb2b 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -2,31 +2,25 @@ * @file llagent.cpp * @brief LLAgent class implementation * - * $LicenseInfo:firstyear=2001&license=viewergpl$ - * - * Copyright (c) 2001-2009, Linden Research, Inc. - * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by Linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ -- cgit v1.2.3 From 64e017fc6b19006c893b4766be05c18ddb3b5593 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 9 Feb 2011 15:04:25 -0500 Subject: SH-915 WIP - allow flycam control in autopilot record/playback --- indra/newview/llagent.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) mode change 100644 => 100755 indra/newview/llagent.cpp (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp old mode 100644 new mode 100755 index de7073be24..3f1bf4c5c2 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1213,7 +1213,13 @@ BOOL LLAgent::getBusy() const //----------------------------------------------------------------------------- // startAutoPilotGlobal() //----------------------------------------------------------------------------- -void LLAgent::startAutoPilotGlobal(const LLVector3d &target_global, const std::string& behavior_name, const LLQuaternion *target_rotation, void (*finish_callback)(BOOL, void *), void *callback_data, F32 stop_distance, F32 rot_threshold) +void LLAgent::startAutoPilotGlobal( + const LLVector3d &target_global, + const std::string& behavior_name, + const LLQuaternion *target_rotation, + void (*finish_callback)(BOOL, void *), + void *callback_data, + F32 stop_distance, F32 rot_threshold) { if (!isAgentAvatarValid()) { -- cgit v1.2.3 From 774405e92bec6bdfa9e2be28e04b4b47fd71615e Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Fri, 18 Feb 2011 23:16:38 +0000 Subject: Cleanup of headless client (was: DisableRendering mode) * Now called 'HeadlessClient' instead of 'DisableRendering' * Removed most cases where we skipped certain behaviors in the client when in this mode. This gets us closer to a 'true' client, for testing purposes. --- indra/newview/llagent.cpp | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 7d908df5ce..7d491a7774 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1119,12 +1119,6 @@ void LLAgent::resetControlFlags() //----------------------------------------------------------------------------- void LLAgent::setAFK() { - // Drones can't go AFK - if (gNoRender) - { - return; - } - if (!gAgent.getRegion()) { // Don't set AFK if we're not talking to a region yet. @@ -1684,11 +1678,6 @@ void LLAgent::clearRenderState(U8 clearstate) //----------------------------------------------------------------------------- U8 LLAgent::getRenderState() { - if (gNoRender || gKeyboard == NULL) - { - return 0; - } - // *FIX: don't do stuff in a getter! This is infinite loop city! if ((mTypingTimer.getElapsedTimeF32() > TYPING_TIMEOUT_SECS) && (mRenderState & AGENT_STATE_TYPING)) -- cgit v1.2.3 From d4d292258e31eee6d639106147758f39deae63e3 Mon Sep 17 00:00:00 2001 From: Ricky Curtice Date: Thu, 10 Mar 2011 22:07:06 -0800 Subject: Squared all dist_vec() based comparisons and other dist_vec() operations where sensible. Not all instances of dist_vec() were squared, only those where it wouldn't (hopefully) change the functionality. --- indra/newview/llagent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 7d908df5ce..4628adee1f 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1343,7 +1343,7 @@ void LLAgent::stopAutoPilot(BOOL user_cancel) //NB: auto pilot can terminate for a reason other than reaching the destination if (mAutoPilotFinishedCallback) { - mAutoPilotFinishedCallback(!user_cancel && dist_vec(gAgent.getPositionGlobal(), mAutoPilotTargetGlobal) < mAutoPilotStopDistance, mAutoPilotCallbackData); + mAutoPilotFinishedCallback(!user_cancel && dist_vec_squared(gAgent.getPositionGlobal(), mAutoPilotTargetGlobal) < mAutoPilotStopDistance * mAutoPilotStopDistance, mAutoPilotCallbackData); } mLeaderID = LLUUID::null; -- cgit v1.2.3 From 9bac314ba0d8b6bd35c8d2e27ce99a28b924dea6 Mon Sep 17 00:00:00 2001 From: Ricky Curtice Date: Sat, 12 Mar 2011 23:39:10 -0800 Subject: Switched to using *_SQUARED constants instead of multiplied constants, and cleaned up a few other minor issues noted during review. --- indra/newview/llagent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 4628adee1f..f3f036a0d8 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1343,7 +1343,7 @@ void LLAgent::stopAutoPilot(BOOL user_cancel) //NB: auto pilot can terminate for a reason other than reaching the destination if (mAutoPilotFinishedCallback) { - mAutoPilotFinishedCallback(!user_cancel && dist_vec_squared(gAgent.getPositionGlobal(), mAutoPilotTargetGlobal) < mAutoPilotStopDistance * mAutoPilotStopDistance, mAutoPilotCallbackData); + mAutoPilotFinishedCallback(!user_cancel && dist_vec_squared(gAgent.getPositionGlobal(), mAutoPilotTargetGlobal) < (mAutoPilotStopDistance * mAutoPilotStopDistance), mAutoPilotCallbackData); } mLeaderID = LLUUID::null; -- cgit v1.2.3 From bc0833d5db9e887f72ea6e7a630781203ad6ad77 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Tue, 15 Mar 2011 04:19:16 +0000 Subject: ER-612: Add LLEventAPI access to LLAgent auto pilot --- indra/newview/llagent.cpp | 51 +++++++++++++++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 17 deletions(-) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 7d491a7774..9025982310 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1214,6 +1214,12 @@ void LLAgent::startAutoPilotGlobal(const LLVector3d &target_global, const std::s return; } + // Are there any pending callbacks from previous auto pilot requests? + if (mAutoPilotFinishedCallback) + { + mAutoPilotFinishedCallback(dist_vec(gAgent.getPositionGlobal(), mAutoPilotTargetGlobal) < mAutoPilotStopDistance, mAutoPilotCallbackData); + } + mAutoPilotFinishedCallback = finish_callback; mAutoPilotCallbackData = callback_data; mAutoPilotRotationThreshold = rot_threshold; @@ -1262,22 +1268,8 @@ void LLAgent::startAutoPilotGlobal(const LLVector3d &target_global, const std::s } mAutoPilot = TRUE; - mAutoPilotTargetGlobal = target_global; - - // trace ray down to find height of destination from ground - LLVector3d traceEndPt = target_global; - traceEndPt.mdV[VZ] -= 20.f; - - LLVector3d targetOnGround; - LLVector3 groundNorm; - LLViewerObject *obj; + setAutoPilotTargetGlobal(target_global); - LLWorld::getInstance()->resolveStepHeightGlobal(NULL, target_global, traceEndPt, targetOnGround, groundNorm, &obj); - F64 target_height = llmax((F64)gAgentAvatarp->getPelvisToFoot(), target_global.mdV[VZ] - targetOnGround.mdV[VZ]); - - // clamp z value of target to minimum height above ground - mAutoPilotTargetGlobal.mdV[VZ] = targetOnGround.mdV[VZ] + target_height; - mAutoPilotTargetDist = (F32)dist_vec(gAgent.getPositionGlobal(), mAutoPilotTargetGlobal); if (target_rotation) { mAutoPilotUseRotation = TRUE; @@ -1294,13 +1286,37 @@ void LLAgent::startAutoPilotGlobal(const LLVector3d &target_global, const std::s } +//----------------------------------------------------------------------------- +// setAutoPilotTargetGlobal +//----------------------------------------------------------------------------- +void LLAgent::setAutoPilotTargetGlobal(const LLVector3d &target_global) +{ + if (mAutoPilot) + { + mAutoPilotTargetGlobal = target_global; + + // trace ray down to find height of destination from ground + LLVector3d traceEndPt = target_global; + traceEndPt.mdV[VZ] -= 20.f; + + LLVector3d targetOnGround; + LLVector3 groundNorm; + LLViewerObject *obj; + + LLWorld::getInstance()->resolveStepHeightGlobal(NULL, target_global, traceEndPt, targetOnGround, groundNorm, &obj); + F64 target_height = llmax((F64)gAgentAvatarp->getPelvisToFoot(), target_global.mdV[VZ] - targetOnGround.mdV[VZ]); + + // clamp z value of target to minimum height above ground + mAutoPilotTargetGlobal.mdV[VZ] = targetOnGround.mdV[VZ] + target_height; + mAutoPilotTargetDist = (F32)dist_vec(gAgent.getPositionGlobal(), mAutoPilotTargetGlobal); + } +} + //----------------------------------------------------------------------------- // startFollowPilot() //----------------------------------------------------------------------------- void LLAgent::startFollowPilot(const LLUUID &leader_id) { - if (!mAutoPilot) return; - mLeaderID = leader_id; if ( mLeaderID.isNull() ) return; @@ -1338,6 +1354,7 @@ void LLAgent::stopAutoPilot(BOOL user_cancel) if (mAutoPilotFinishedCallback) { mAutoPilotFinishedCallback(!user_cancel && dist_vec(gAgent.getPositionGlobal(), mAutoPilotTargetGlobal) < mAutoPilotStopDistance, mAutoPilotCallbackData); + mAutoPilotFinishedCallback = NULL; } mLeaderID = LLUUID::null; -- cgit v1.2.3 From 1c34f5caff0f074e983a8ef4d89fd08f1210f526 Mon Sep 17 00:00:00 2001 From: Dave SIMmONs Date: Thu, 17 Mar 2011 16:22:54 -0700 Subject: ER-612: Add LLEventAPI access to LLAgent auto pilot. Follow-on work to allow blocking of flying during autopilot. Reviewed by Kelly. --- indra/newview/llagent.cpp | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 9025982310..75acd1a0be 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -198,6 +198,7 @@ LLAgent::LLAgent() : mAutoPilot(FALSE), mAutoPilotFlyOnStop(FALSE), + mAutoPilotAllowFlying(TRUE), mAutoPilotTargetGlobal(), mAutoPilotStopDistance(1.f), mAutoPilotUseRotation(FALSE), @@ -1207,7 +1208,7 @@ BOOL LLAgent::getBusy() const //----------------------------------------------------------------------------- // startAutoPilotGlobal() //----------------------------------------------------------------------------- -void LLAgent::startAutoPilotGlobal(const LLVector3d &target_global, const std::string& behavior_name, const LLQuaternion *target_rotation, void (*finish_callback)(BOOL, void *), void *callback_data, F32 stop_distance, F32 rot_threshold) +void LLAgent::startAutoPilotGlobal(const LLVector3d &target_global, const std::string& behavior_name, const LLQuaternion *target_rotation, void (*finish_callback)(BOOL, void *), void *callback_data, F32 stop_distance, F32 rot_threshold, BOOL allow_flying) { if (!isAgentAvatarValid()) { @@ -1224,6 +1225,7 @@ void LLAgent::startAutoPilotGlobal(const LLVector3d &target_global, const std::s mAutoPilotCallbackData = callback_data; mAutoPilotRotationThreshold = rot_threshold; mAutoPilotBehaviorName = behavior_name; + mAutoPilotAllowFlying = allow_flying; LLVector3d delta_pos( target_global ); delta_pos -= getPositionGlobal(); @@ -1251,14 +1253,23 @@ void LLAgent::startAutoPilotGlobal(const LLVector3d &target_global, const std::s } } - mAutoPilotFlyOnStop = getFlying(); + if (mAutoPilotAllowFlying) + { + mAutoPilotFlyOnStop = getFlying(); + } + else + { + mAutoPilotFlyOnStop = FALSE; + } - if (distance > 30.0) + if (distance > 30.0 && mAutoPilotAllowFlying) { setFlying(TRUE); } - if ( distance > 1.f && heightDelta > (sqrtf(mAutoPilotStopDistance) + 1.f)) + if ( distance > 1.f && + mAutoPilotAllowFlying && + heightDelta > (sqrtf(mAutoPilotStopDistance) + 1.f)) { setFlying(TRUE); // Do not force flying for "Sit" behavior to prevent flying after pressing "Stand" @@ -1394,7 +1405,7 @@ void LLAgent::autoPilot(F32 *delta_yaw) if (!isAgentAvatarValid()) return; - if (gAgentAvatarp->mInAir) + if (gAgentAvatarp->mInAir && mAutoPilotAllowFlying) { setFlying(TRUE); } -- cgit v1.2.3 From becc9d09970755f9cc0d95c46b9f2d81d5b856b5 Mon Sep 17 00:00:00 2001 From: Dave SIMmONs Date: Tue, 22 Mar 2011 15:44:02 -0700 Subject: Improve LLEventHost API for autopilot and following avatars. Reviewed by Kelly. --- indra/newview/llagent.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 75acd1a0be..fd5cee2772 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1326,7 +1326,7 @@ void LLAgent::setAutoPilotTargetGlobal(const LLVector3d &target_global) //----------------------------------------------------------------------------- // startFollowPilot() //----------------------------------------------------------------------------- -void LLAgent::startFollowPilot(const LLUUID &leader_id) +void LLAgent::startFollowPilot(const LLUUID &leader_id, BOOL allow_flying, F32 stop_distance) { mLeaderID = leader_id; if ( mLeaderID.isNull() ) return; @@ -1338,7 +1338,14 @@ void LLAgent::startFollowPilot(const LLUUID &leader_id) return; } - startAutoPilotGlobal(object->getPositionGlobal()); + startAutoPilotGlobal(object->getPositionGlobal(), + std::string(), // behavior_name + NULL, // target_rotation + NULL, // finish_callback + NULL, // callback_data + stop_distance, + 0.03f, // rotation_threshold + allow_flying); } -- cgit v1.2.3 From 367823ced0cc885474850b4400c7936d667a7d7a Mon Sep 17 00:00:00 2001 From: callum Date: Fri, 29 Apr 2011 15:35:22 -0700 Subject: EXP-623 FIX Selecting fly option while on click to walk path flys avatar to end point but avatar spins and shakes when arriving at click point --- indra/newview/llagent.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 7d491a7774..a6d2c96d52 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -62,6 +62,7 @@ #include "llstatusbar.h" #include "llteleportflags.h" #include "lltool.h" +#include "lltoolpie.h" #include "lltoolmgr.h" #include "lltrans.h" #include "llurlentry.h" @@ -559,6 +560,8 @@ void LLAgent::setFlying(BOOL fly) // static void LLAgent::toggleFlying() { + LLToolPie::instance().stopClickToWalk(); + BOOL fly = !gAgent.getFlying(); gAgent.mMoveTimer.reset(); -- cgit v1.2.3 From dbc92691a62be9c9cdb764ab6f17510c7c7ba64d Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Thu, 5 May 2011 17:13:52 -0700 Subject: Work in progress on CHOP-609 / CHOP-624 build time improvements. Eliminated a bunch of unnecesary header dependencies. --- indra/newview/llagent.cpp | 73 +++++++++++++++++++++++++++++------------------ 1 file changed, 46 insertions(+), 27 deletions(-) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index aea4e78436..c8306117ba 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -25,10 +25,12 @@ */ #include "llviewerprecompiledheaders.h" + #include "llagent.h" #include "pipeline.h" +#include "llagentaccess.h" #include "llagentcamera.h" #include "llagentlistener.h" #include "llagentwearables.h" @@ -36,6 +38,7 @@ #include "llanimationstates.h" #include "llbottomtray.h" #include "llcallingcard.h" +#include "llcapabilitylistener.h" #include "llchannelmanager.h" #include "llconsole.h" #include "llfirstuse.h" @@ -55,8 +58,10 @@ #include "llpaneltopinfobar.h" #include "llparcel.h" #include "llrendersphere.h" +#include "llsdmessage.h" #include "llsdutil.h" #include "llsky.h" +#include "llslurl.h" #include "llsmoothstep.h" #include "llstartup.h" #include "llstatusbar.h" @@ -73,6 +78,7 @@ #include "llviewerobjectlist.h" #include "llviewerparcelmgr.h" #include "llviewerstats.h" +#include "llviewerwindow.h" #include "llvoavatarself.h" #include "llwindow.h" #include "llworld.h" @@ -171,7 +177,8 @@ LLAgent::LLAgent() : mbRunning(false), mbTeleportKeepsLookAt(false), - mAgentAccess(gSavedSettings), + mAgentAccess(new LLAgentAccess(gSavedSettings)), + mTeleportSourceSLURL(new LLSLURL), mTeleportState( TELEPORT_NONE ), mRegionp(NULL), @@ -208,7 +215,7 @@ LLAgent::LLAgent() : mAutoPilotFinishedCallback(NULL), mAutoPilotCallbackData(NULL), - mEffectColor(LLColor4(0.f, 1.f, 1.f, 1.f)), + mEffectColor(new LLUIColor(LLColor4(0.f, 1.f, 1.f, 1.f))), mHaveHomePosition(FALSE), mHomeRegionHandle( 0 ), @@ -250,7 +257,7 @@ void LLAgent::init() setFlying( gSavedSettings.getBOOL("FlyingAtExit") ); - mEffectColor = LLUIColorTable::instance().getColor("EffectColor"); + *mEffectColor = LLUIColorTable::instance().getColor("EffectColor"); gSavedSettings.getControl("PreferredMaturity")->getValidateSignal()->connect(boost::bind(&LLAgent::validateMaturity, this, _2)); gSavedSettings.getControl("PreferredMaturity")->getSignal()->connect(boost::bind(&LLAgent::handleMaturity, this, _2)); @@ -274,9 +281,16 @@ LLAgent::~LLAgent() cleanup(); delete mMouselookModeInSignal; + mMouselookModeInSignal = NULL; delete mMouselookModeOutSignal; + mMouselookModeOutSignal = NULL; - // *Note: this is where LLViewerCamera::getInstance() used to be deleted. + delete mAgentAccess; + mAgentAccess = NULL; + delete mEffectColor; + mEffectColor = NULL; + delete mTeleportSourceSLURL; + mTeleportSourceSLURL = NULL; } // Handle any actions that need to be performed when the main app gains focus @@ -2139,32 +2153,32 @@ void LLAgent::onAnimStop(const LLUUID& id) bool LLAgent::isGodlike() const { - return mAgentAccess.isGodlike(); + return mAgentAccess->isGodlike(); } bool LLAgent::isGodlikeWithoutAdminMenuFakery() const { - return mAgentAccess.isGodlikeWithoutAdminMenuFakery(); + return mAgentAccess->isGodlikeWithoutAdminMenuFakery(); } U8 LLAgent::getGodLevel() const { - return mAgentAccess.getGodLevel(); + return mAgentAccess->getGodLevel(); } bool LLAgent::wantsPGOnly() const { - return mAgentAccess.wantsPGOnly(); + return mAgentAccess->wantsPGOnly(); } bool LLAgent::canAccessMature() const { - return mAgentAccess.canAccessMature(); + return mAgentAccess->canAccessMature(); } bool LLAgent::canAccessAdult() const { - return mAgentAccess.canAccessAdult(); + return mAgentAccess->canAccessAdult(); } bool LLAgent::canAccessMaturityInRegion( U64 region_handle ) const @@ -2199,37 +2213,37 @@ bool LLAgent::canAccessMaturityAtGlobal( LLVector3d pos_global ) const bool LLAgent::prefersPG() const { - return mAgentAccess.prefersPG(); + return mAgentAccess->prefersPG(); } bool LLAgent::prefersMature() const { - return mAgentAccess.prefersMature(); + return mAgentAccess->prefersMature(); } bool LLAgent::prefersAdult() const { - return mAgentAccess.prefersAdult(); + return mAgentAccess->prefersAdult(); } bool LLAgent::isTeen() const { - return mAgentAccess.isTeen(); + return mAgentAccess->isTeen(); } bool LLAgent::isMature() const { - return mAgentAccess.isMature(); + return mAgentAccess->isMature(); } bool LLAgent::isAdult() const { - return mAgentAccess.isAdult(); + return mAgentAccess->isAdult(); } void LLAgent::setTeen(bool teen) { - mAgentAccess.setTeen(teen); + mAgentAccess->setTeen(teen); } //static @@ -2274,37 +2288,37 @@ bool LLAgent::sendMaturityPreferenceToServer(int preferredMaturity) BOOL LLAgent::getAdminOverride() const { - return mAgentAccess.getAdminOverride(); + return mAgentAccess->getAdminOverride(); } void LLAgent::setMaturity(char text) { - mAgentAccess.setMaturity(text); + mAgentAccess->setMaturity(text); } void LLAgent::setAdminOverride(BOOL b) { - mAgentAccess.setAdminOverride(b); + mAgentAccess->setAdminOverride(b); } void LLAgent::setGodLevel(U8 god_level) { - mAgentAccess.setGodLevel(god_level); + mAgentAccess->setGodLevel(god_level); } void LLAgent::setAOTransition() { - mAgentAccess.setTransition(); + mAgentAccess->setTransition(); } const LLAgentAccess& LLAgent::getAgentAccess() { - return mAgentAccess; + return *mAgentAccess; } bool LLAgent::validateMaturity(const LLSD& newvalue) { - return mAgentAccess.canSetMaturity(newvalue.asInteger()); + return mAgentAccess->canSetMaturity(newvalue.asInteger()); } void LLAgent::handleMaturity(const LLSD& newvalue) @@ -2636,12 +2650,12 @@ BOOL LLAgent::allowOperation(PermissionBit op, const LLColor4 &LLAgent::getEffectColor() { - return mEffectColor; + return *mEffectColor; } void LLAgent::setEffectColor(const LLColor4 &color) { - mEffectColor = color; + *mEffectColor = color; } void LLAgent::initOriginGlobal(const LLVector3d &origin_global) @@ -3469,7 +3483,7 @@ void LLAgent::setTeleportState(ETeleportState state) case TELEPORT_MOVING: // We're outa here. Save "back" slurl. - LLAgentUI::buildSLURL(mTeleportSourceSLURL); + LLAgentUI::buildSLURL(*mTeleportSourceSLURL); break; case TELEPORT_ARRIVING: @@ -3802,6 +3816,11 @@ void LLAgent::parseTeleportMessages(const std::string& xml_filename) }//end for (all message sets in xml file) } +const void LLAgent::getTeleportSourceSLURL(LLSLURL& slurl) const +{ + slurl = *mTeleportSourceSLURL; +} + void LLAgent::sendAgentUpdateUserInfo(bool im_via_email, const std::string& directory_visibility ) { gMessageSystem->newMessageFast(_PREHASH_UpdateUserInfo); -- cgit v1.2.3 From cccca566bd2365c88cca819729c5432af9dfa52f Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Mon, 16 May 2011 17:17:01 +0300 Subject: STORM-1245 WIP Reimplementing management of local presets according to the new spec. User environment preferences are now persistent. TODO: Implement applying region env. settings. --- indra/newview/llagent.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index cb3c5319c9..38e6caa4b3 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -637,11 +637,19 @@ void LLAgent::setRegion(LLViewerRegion *regionp) bool teleport = (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE); if (teleport) { +#if 0 LLEnvManager::getInstance()->notifyTP(); +#else + LLEnvManagerNew::instance().onTeleport(); +#endif } else { +#if 0 LLEnvManager::getInstance()->notifyCrossing(); +#else + LLEnvManagerNew::instance().onRegionCrossing(); +#endif } } else @@ -661,7 +669,11 @@ void LLAgent::setRegion(LLViewerRegion *regionp) LLWorld::getInstance()->updateAgentOffset(mAgentOriginGlobal); // Notify windlight managers about login +#if 0 LLEnvManager::getInstance()->notifyLogin(); +#else + LLEnvManagerNew::instance().onLogin(); +#endif } // Pass new region along to metrics components that care about this level of detail. @@ -687,8 +699,12 @@ void LLAgent::setRegion(LLViewerRegion *regionp) LLFloaterMove::sUpdateFlyingStatus(); +#if 0 // notify EnvManager that a refresh is needed LLEnvManager::instance().refreshFromStorage(LLEnvKey::SCOPE_REGION); +#else + LLEnvManagerNew::instance().onTeleport(); +#endif } -- cgit v1.2.3 From 683c9ff3f8e662c1906e5ee6319f7d46513bca81 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Mon, 16 May 2011 17:21:53 +0300 Subject: STORM-1245 WIP Removed some dead code. --- indra/newview/llagent.cpp | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 38e6caa4b3..bcc1953acc 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -637,19 +637,11 @@ void LLAgent::setRegion(LLViewerRegion *regionp) bool teleport = (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE); if (teleport) { -#if 0 - LLEnvManager::getInstance()->notifyTP(); -#else LLEnvManagerNew::instance().onTeleport(); -#endif } else { -#if 0 - LLEnvManager::getInstance()->notifyCrossing(); -#else LLEnvManagerNew::instance().onRegionCrossing(); -#endif } } else @@ -669,11 +661,7 @@ void LLAgent::setRegion(LLViewerRegion *regionp) LLWorld::getInstance()->updateAgentOffset(mAgentOriginGlobal); // Notify windlight managers about login -#if 0 - LLEnvManager::getInstance()->notifyLogin(); -#else LLEnvManagerNew::instance().onLogin(); -#endif } // Pass new region along to metrics components that care about this level of detail. @@ -699,12 +687,7 @@ void LLAgent::setRegion(LLViewerRegion *regionp) LLFloaterMove::sUpdateFlyingStatus(); -#if 0 - // notify EnvManager that a refresh is needed - LLEnvManager::instance().refreshFromStorage(LLEnvKey::SCOPE_REGION); -#else - LLEnvManagerNew::instance().onTeleport(); -#endif + LLEnvManagerNew::instance().onTeleport(); } -- cgit v1.2.3 From 348218e40f362d386a0175d4b010b639282764b2 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Tue, 17 May 2011 16:26:55 +0300 Subject: STORM-1245 WIP Restored environment settings interpolation on region crossing. Also got rid of duplicated region environment settings requests. --- indra/newview/llagent.cpp | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index bcc1953acc..fbe15505d8 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -596,6 +596,8 @@ void LLAgent::standUp() //----------------------------------------------------------------------------- void LLAgent::setRegion(LLViewerRegion *regionp) { + bool teleport = true; + llassert(regionp); if (mRegionp != regionp) { @@ -634,15 +636,7 @@ void LLAgent::setRegion(LLViewerRegion *regionp) } // Notify windlight managers - bool teleport = (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE); - if (teleport) - { - LLEnvManagerNew::instance().onTeleport(); - } - else - { - LLEnvManagerNew::instance().onRegionCrossing(); - } + teleport = (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE); } else { @@ -659,9 +653,6 @@ void LLAgent::setRegion(LLViewerRegion *regionp) // Update all of the regions. LLWorld::getInstance()->updateAgentOffset(mAgentOriginGlobal); - - // Notify windlight managers about login - LLEnvManagerNew::instance().onLogin(); } // Pass new region along to metrics components that care about this level of detail. @@ -687,7 +678,14 @@ void LLAgent::setRegion(LLViewerRegion *regionp) LLFloaterMove::sUpdateFlyingStatus(); - LLEnvManagerNew::instance().onTeleport(); + if (teleport) + { + LLEnvManagerNew::instance().onTeleport(); + } + else + { + LLEnvManagerNew::instance().onRegionCrossing(); + } } -- cgit v1.2.3 From 424366a66fc44d2f7194c9b1d1cc940bb4df6c79 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Fri, 1 Jul 2011 21:11:36 +0300 Subject: STORM-1137 FIXED Close the REGION/ESTATE floater when teleporting. --- indra/newview/llagent.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index fa6488e486..8954937f69 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -3350,6 +3350,9 @@ bool LLAgent::teleportCore(bool is_local) // hide land floater too - it'll be out of date LLFloaterReg::hideInstance("about_land"); + // hide the Region/Estate floater + LLFloaterReg::hideInstance("region_info"); + // hide the search floater (EXT-8276) LLFloaterReg::hideInstance("search"); -- cgit v1.2.3