diff options
Diffstat (limited to 'indra/newview/llagent.cpp')
-rwxr-xr-x[-rw-r--r--] | indra/newview/llagent.cpp | 362 |
1 files changed, 273 insertions, 89 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 001a6a8851..3870a3be2e 100644..100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -25,19 +25,23 @@ */ #include "llviewerprecompiledheaders.h" + #include "llagent.h" #include "pipeline.h" +#include "llagentaccess.h" #include "llagentcamera.h" #include "llagentlistener.h" #include "llagentwearables.h" #include "llagentui.h" #include "llanimationstates.h" -#include "llbottomtray.h" #include "llcallingcard.h" +#include "llcapabilitylistener.h" #include "llchannelmanager.h" +#include "llchicletbar.h" #include "llconsole.h" +#include "llenvmanager.h" #include "llfirstuse.h" #include "llfloatercamera.h" #include "llfloaterreg.h" @@ -55,15 +59,21 @@ #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" #include "llteleportflags.h" #include "lltool.h" +#include "lltoolbarview.h" +#include "lltoolpie.h" #include "lltoolmgr.h" #include "lltrans.h" +#include "lluictrl.h" +#include "llurlentry.h" #include "llviewercontrol.h" #include "llviewerdisplay.h" #include "llviewerjoystick.h" @@ -72,10 +82,12 @@ #include "llviewerobjectlist.h" #include "llviewerparcelmgr.h" #include "llviewerstats.h" +#include "llviewerwindow.h" #include "llvoavatarself.h" #include "llwindow.h" #include "llworld.h" #include "llworldmap.h" +#include "stringize.h" using namespace LLVOAvatarDefines; @@ -97,7 +109,6 @@ const F64 CHAT_AGE_FAST_RATE = 3.0; const F32 MIN_FIDGET_TIME = 8.f; // seconds const F32 MAX_FIDGET_TIME = 20.f; // seconds - // The agent instance. LLAgent gAgent; @@ -105,6 +116,9 @@ LLAgent gAgent; // Statics // +/// minimum time after setting away state before coming back based on movement +const F32 LLAgent::MIN_AFK_TIME = 10.0f; + const F32 LLAgent::TYPING_TIMEOUT_SECS = 5.f; std::map<std::string, std::string> LLAgent::sTeleportErrorMessages; @@ -140,6 +154,64 @@ bool handleSlowMotionAnimation(const LLSD& newvalue) return true; } +// static +void LLAgent::parcelChangedCallback() +{ + bool can_edit = LLToolMgr::getInstance()->canEdit(); + + gAgent.mCanEditParcel = can_edit; +} + +// static +bool LLAgent::isActionAllowed(const LLSD& sdname) +{ + bool retval = false; + + const std::string& param = sdname.asString(); + + if (param == "speak") + { + if ( gAgent.isVoiceConnected() && + LLViewerParcelMgr::getInstance()->allowAgentVoice() && + ! LLVoiceClient::getInstance()->inTuningMode() ) + { + retval = true; + } + else + { + retval = false; + } + } + + return retval; +} + +// static +void LLAgent::pressMicrophone(const LLSD& name) +{ + LLFirstUse::speak(false); + + LLVoiceClient::getInstance()->inputUserControlState(true); +} + +// static +void LLAgent::releaseMicrophone(const LLSD& name) +{ + LLVoiceClient::getInstance()->inputUserControlState(false); +} + +// static +void LLAgent::toggleMicrophone(const LLSD& name) +{ + LLVoiceClient::getInstance()->toggleUserPTTState(); +} + +// static +bool LLAgent::isMicrophoneOn(const LLSD& sdname) +{ + return LLVoiceClient::getInstance()->getUserPTTState(); +} + // ************************************************************ // Enabled this definition to compile a 'hacked' viewer that // locally believes the end user has godlike powers. @@ -170,7 +242,9 @@ LLAgent::LLAgent() : mbRunning(false), mbTeleportKeepsLookAt(false), - mAgentAccess(gSavedSettings), + mAgentAccess(new LLAgentAccess(gSavedSettings)), + mCanEditParcel(false), + mTeleportSourceSLURL(new LLSLURL), mTeleportState( TELEPORT_NONE ), mRegionp(NULL), @@ -197,6 +271,7 @@ LLAgent::LLAgent() : mAutoPilot(FALSE), mAutoPilotFlyOnStop(FALSE), + mAutoPilotAllowFlying(TRUE), mAutoPilotTargetGlobal(), mAutoPilotStopDistance(1.f), mAutoPilotUseRotation(FALSE), @@ -207,7 +282,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 ), @@ -217,8 +292,13 @@ LLAgent::LLAgent() : mCurrentFidget(0), mFirstLogin(FALSE), mGenderChosen(FALSE), + + mVoiceConnected(false), + + mAppearanceSerialNum(0), - mAppearanceSerialNum(0) + mMouselookModeInSignal(NULL), + mMouselookModeOutSignal(NULL) { for (U32 i = 0; i < TOTAL_CONTROLS; i++) { @@ -246,11 +326,13 @@ 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)); - + + LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback(boost::bind(&LLAgent::parcelChangedCallback)); + mInitialized = TRUE; } @@ -269,7 +351,17 @@ LLAgent::~LLAgent() { cleanup(); - // *Note: this is where LLViewerCamera::getInstance() used to be deleted. + delete mMouselookModeInSignal; + mMouselookModeInSignal = NULL; + delete mMouselookModeOutSignal; + mMouselookModeOutSignal = NULL; + + 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 @@ -552,6 +644,11 @@ void LLAgent::setFlying(BOOL fly) // static void LLAgent::toggleFlying() { + if ( gAgent.mAutoPilot ) + { + LLToolPie::instance().stopClickToWalk(); + } + BOOL fly = !gAgent.getFlying(); gAgent.mMoveTimer.reset(); @@ -583,6 +680,8 @@ void LLAgent::standUp() //----------------------------------------------------------------------------- void LLAgent::setRegion(LLViewerRegion *regionp) { + bool teleport = true; + llassert(regionp); if (mRegionp != regionp) { @@ -620,6 +719,8 @@ void LLAgent::setRegion(LLViewerRegion *regionp) gSky.mVOGroundp->setRegion(regionp); } + // Notify windlight managers + teleport = (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE); } else { @@ -637,9 +738,16 @@ void LLAgent::setRegion(LLViewerRegion *regionp) // Update all of the regions. LLWorld::getInstance()->updateAgentOffset(mAgentOriginGlobal); } + + // Pass new region along to metrics components that care about this level of detail. + LLAppViewer::metricsUpdateRegion(regionp->getHandle()); } mRegionp = regionp; + // Pass the region host to LLUrlEntryParcel to resolve parcel name + // with a server request. + LLUrlEntryParcel::setRegionHost(getRegionHost()); + // Must shift hole-covering water object locations because local // coordinate frame changed. LLWorld::getInstance()->updateWaterObjects(); @@ -653,6 +761,15 @@ void LLAgent::setRegion(LLViewerRegion *regionp) LLSelectMgr::getInstance()->updateSelectionCenter(); LLFloaterMove::sUpdateFlyingStatus(); + + if (teleport) + { + LLEnvManagerNew::instance().onTeleport(); + } + else + { + LLEnvManagerNew::instance().onRegionCrossing(); + } } @@ -980,20 +1097,11 @@ F32 LLAgent::clampPitchToLimits(F32 angle) LLVector3 skyward = getReferenceUpVector(); - F32 look_down_limit; - F32 look_up_limit = 10.f * DEG_TO_RAD; + const F32 look_down_limit = 179.f * DEG_TO_RAD;; + const F32 look_up_limit = 1.f * DEG_TO_RAD; F32 angle_from_skyward = acos( mFrameAgent.getAtAxis() * skyward ); - if (isAgentAvatarValid() && gAgentAvatarp->isSitting()) - { - look_down_limit = 130.f * DEG_TO_RAD; - } - else - { - look_down_limit = 170.f * DEG_TO_RAD; - } - // clamp pitch to limits if ((angle >= 0.f) && (angle_from_skyward + angle > look_down_limit)) { @@ -1105,12 +1213,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. @@ -1121,6 +1223,7 @@ void LLAgent::setAFK() { sendAnimationRequest(ANIM_AGENT_AWAY, ANIM_REQUEST_START); setControlFlags(AGENT_CONTROL_AWAY | AGENT_CONTROL_STOP); + LL_INFOS("AFK") << "Setting Away" << LL_ENDL; gAwayTimer.start(); if (gAFKMenu) { @@ -1144,6 +1247,7 @@ void LLAgent::clearAFK() { sendAnimationRequest(ANIM_AGENT_AWAY, ANIM_REQUEST_STOP); clearControlFlags(AGENT_CONTROL_AWAY); + LL_INFOS("AFK") << "Clearing Away" << LL_ENDL; if (gAFKMenu) { gAFKMenu->setLabel(LLTrans::getString("AvatarSetAway")); @@ -1199,17 +1303,32 @@ 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()) { 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; mAutoPilotBehaviorName = behavior_name; + mAutoPilotAllowFlying = allow_flying; LLVector3d delta_pos( target_global ); delta_pos -= getPositionGlobal(); @@ -1230,21 +1349,30 @@ 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; } } - 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" @@ -1254,22 +1382,8 @@ void LLAgent::startAutoPilotGlobal(const LLVector3d &target_global, const std::s } mAutoPilot = TRUE; - mAutoPilotTargetGlobal = target_global; + setAutoPilotTargetGlobal(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); if (target_rotation) { mAutoPilotUseRotation = TRUE; @@ -1287,12 +1401,36 @@ void LLAgent::startAutoPilotGlobal(const LLVector3d &target_global, const std::s //----------------------------------------------------------------------------- -// startFollowPilot() +// setAutoPilotTargetGlobal //----------------------------------------------------------------------------- -void LLAgent::startFollowPilot(const LLUUID &leader_id) +void LLAgent::setAutoPilotTargetGlobal(const LLVector3d &target_global) { - if (!mAutoPilot) return; + 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, BOOL allow_flying, F32 stop_distance) +{ mLeaderID = leader_id; if ( mLeaderID.isNull() ) return; @@ -1303,7 +1441,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); } @@ -1330,6 +1475,7 @@ void LLAgent::stopAutoPilot(BOOL user_cancel) if (mAutoPilotFinishedCallback) { mAutoPilotFinishedCallback(!user_cancel && dist_vec(gAgent.getPositionGlobal(), mAutoPilotTargetGlobal) < mAutoPilotStopDistance, mAutoPilotCallbackData); + mAutoPilotFinishedCallback = NULL; } mLeaderID = LLUUID::null; @@ -1369,7 +1515,7 @@ void LLAgent::autoPilot(F32 *delta_yaw) if (!isAgentAvatarValid()) return; - if (gAgentAvatarp->mInAir) + if (gAgentAvatarp->mInAir && mAutoPilotAllowFlying) { setFlying(TRUE); } @@ -1670,11 +1816,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)) @@ -1712,11 +1853,12 @@ void LLAgent::endAnimationUpdateUI() // clean up UI from mode we're leaving if (gAgentCamera.getLastCameraMode() == CAMERA_MODE_MOUSELOOK ) { + gToolBarView->setToolBarsVisible(true); // show mouse cursor gViewerWindow->showCursor(); // show menus gMenuBarView->setVisible(TRUE); - LLNavigationBar::getInstance()->setVisible(TRUE); + LLNavigationBar::getInstance()->setVisible(TRUE && gSavedSettings.getBOOL("ShowNavbarNavigationPanel")); gStatusBar->setVisibleForMouselook(true); if (gSavedSettings.getBOOL("ShowMiniLocationPanel")) @@ -1724,7 +1866,7 @@ void LLAgent::endAnimationUpdateUI() LLPanelTopInfoBar::getInstance()->setVisible(TRUE); } - LLBottomTray::getInstance()->onMouselookModeOut(); + LLChicletBar::getInstance()->setVisible(TRUE); LLPanelStandStopFlying::getInstance()->setVisible(TRUE); @@ -1732,6 +1874,11 @@ void LLAgent::endAnimationUpdateUI() LLFloaterCamera::onLeavingMouseLook(); + if (mMouselookModeOutSignal) + { + (*mMouselookModeOutSignal)(); + } + // Only pop if we have pushed... if (TRUE == mViewsPushed) { @@ -1816,14 +1963,19 @@ void LLAgent::endAnimationUpdateUI() //--------------------------------------------------------------------- if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK) { - // hide menus + // clean up UI + // first show anything hidden by UI toggle + gViewerWindow->setUIVisibility(TRUE); + + // then hide stuff we want hidden for mouselook + gToolBarView->setToolBarsVisible(false); gMenuBarView->setVisible(FALSE); LLNavigationBar::getInstance()->setVisible(FALSE); gStatusBar->setVisibleForMouselook(false); LLPanelTopInfoBar::getInstance()->setVisible(FALSE); - LLBottomTray::getInstance()->onMouselookModeIn(); + LLChicletBar::getInstance()->setVisible(FALSE); LLPanelStandStopFlying::getInstance()->setVisible(FALSE); @@ -1837,6 +1989,11 @@ void LLAgent::endAnimationUpdateUI() mViewsPushed = TRUE; + if (mMouselookModeInSignal) + { + (*mMouselookModeInSignal)(); + } + // hide all floaters except the mini map #if 0 // Use this once all floaters are registered @@ -1896,7 +2053,6 @@ void LLAgent::endAnimationUpdateUI() } } } - } else if (gAgentCamera.getCameraMode() == CAMERA_MODE_CUSTOMIZE_AVATAR) { @@ -1928,6 +2084,18 @@ void LLAgent::endAnimationUpdateUI() gAgentCamera.updateLastCamera(); } +boost::signals2::connection LLAgent::setMouselookModeInCallback( const camera_signal_t::slot_type& cb ) +{ + if (!mMouselookModeInSignal) mMouselookModeInSignal = new camera_signal_t(); + return mMouselookModeInSignal->connect(cb); +} + +boost::signals2::connection LLAgent::setMouselookModeOutCallback( const camera_signal_t::slot_type& cb ) +{ + if (!mMouselookModeOutSignal) mMouselookModeOutSignal = new camera_signal_t(); + return mMouselookModeOutSignal->connect(cb); +} + //----------------------------------------------------------------------------- // heardChat() //----------------------------------------------------------------------------- @@ -2115,32 +2283,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 @@ -2175,37 +2343,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 @@ -2250,37 +2418,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) @@ -2612,12 +2780,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) @@ -3142,6 +3310,7 @@ void LLAgent::processAgentCachedTextureResponse(LLMessageSystem *mesgsys, void * } llinfos << "Received cached texture response for " << num_results << " textures." << llendl; + gAgentAvatarp->outputRezTiming("Fetched agent wearables textures from cache. Will now load them"); gAgentAvatarp->updateMeshTextures(); @@ -3251,8 +3420,18 @@ bool LLAgent::teleportCore(bool is_local) // hide land floater too - it'll be out of date LLFloaterReg::hideInstance("about_land"); - // hide the search floater (EXT-8276) - LLFloaterReg::hideInstance("search"); + // hide the Region/Estate floater + LLFloaterReg::hideInstance("region_info"); + + // minimize the Search floater (STORM-1474) + { + LLFloater* instance = LLFloaterReg::getInstance("search"); + + if (instance && instance->getVisible()) + { + instance->setMinimized(TRUE); + } + } LLViewerParcelMgr::getInstance()->deselectLand(); LLViewerMediaFocus::getInstance()->clearFocus(); @@ -3445,7 +3624,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: @@ -3778,6 +3957,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); @@ -3808,14 +3992,14 @@ void LLAgent::renderAutoPilotTarget() F32 height_meters; LLVector3d target_global; - glMatrixMode(GL_MODELVIEW); + gGL.matrixMode(LLRender::MM_MODELVIEW); gGL.pushMatrix(); // not textured gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); // lovely green - glColor4f(0.f, 1.f, 1.f, 1.f); + gGL.color4f(0.f, 1.f, 1.f, 1.f); target_global = mAutoPilotTargetGlobal; @@ -3823,9 +4007,9 @@ void LLAgent::renderAutoPilotTarget() height_meters = 1.f; - glScalef(height_meters, height_meters, height_meters); + gGL.scalef(height_meters, height_meters, height_meters); - gSphere.render(1500.f); + gSphere.render(); gGL.popMatrix(); } |