diff options
Diffstat (limited to 'indra/newview/llagent.cpp')
-rw-r--r-- | indra/newview/llagent.cpp | 593 |
1 files changed, 384 insertions, 209 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 95ba14dda7..6d03fdd61f 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -102,7 +102,7 @@ using namespace LLAvatarAppearanceDefines; extern LLMenuBarGL* gMenuBarView; -const BOOL ANIMATE = TRUE; +const bool ANIMATE = true; const U8 AGENT_STATE_TYPING = 0x04; const U8 AGENT_STATE_EDITING = 0x10; @@ -186,7 +186,7 @@ private: class LLTeleportRequestViaLure : public LLTeleportRequestViaLandmark { public: - LLTeleportRequestViaLure(const LLUUID &pLureId, BOOL pIsLureGodLike); + LLTeleportRequestViaLure(const LLUUID &pLureId, bool pIsLureGodLike); virtual ~LLTeleportRequestViaLure(); virtual void toOstream(std::ostream& os) const; @@ -196,10 +196,10 @@ public: virtual void startTeleport(); protected: - inline BOOL isLureGodLike() const {return mIsLureGodLike;}; + inline bool isLureGodLike() const {return mIsLureGodLike;}; private: - BOOL mIsLureGodLike; + bool mIsLureGodLike; }; class LLTeleportRequestViaLocation : public LLTeleportRequest @@ -309,7 +309,7 @@ bool LLAgent::isActionAllowed(const LLSD& sdname) } else { - allow_agent_voice = channel->isActive() && channel->callStarted(); + allow_agent_voice = channel->isActive(); } } @@ -371,7 +371,7 @@ bool LLAgent::isMicrophoneOn(const LLSD& sdname) //----------------------------------------------------------------------------- LLAgent::LLAgent() : mGroupPowers(0), - mHideGroupTitle(FALSE), + mHideGroupTitle(false), mGroupID(), mInitialized(false), @@ -403,7 +403,7 @@ LLAgent::LLAgent() : mHttpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID), mTeleportState(TELEPORT_NONE), mRegionp(NULL), - mInterestListMode(LLViewerRegion::IL_MODE_DEFAULT), + mInterestListMode(IL_MODE_DEFAULT), mAgentOriginGlobal(), mPositionGlobal(), @@ -415,24 +415,22 @@ LLAgent::LLAgent() : mRenderState(0), mTypingTimer(), - mViewsPushed(FALSE), + mViewsPushed(false), - mCustomAnim(FALSE), - mShowAvatar(TRUE), + mCustomAnim(false), + mShowAvatar(true), mFrameAgent(), mIsDoNotDisturb(false), mControlFlags(0x00000000), - mbFlagsDirty(FALSE), - mbFlagsNeedReset(FALSE), - mAutoPilot(FALSE), - mAutoPilotFlyOnStop(FALSE), - mAutoPilotAllowFlying(TRUE), + mAutoPilot(false), + mAutoPilotFlyOnStop(false), + mAutoPilotAllowFlying(true), mAutoPilotTargetGlobal(), mAutoPilotStopDistance(1.f), - mAutoPilotUseRotation(FALSE), + mAutoPilotUseRotation(false), mAutoPilotTargetFacing(LLVector3::zero), mAutoPilotTargetDist(0.f), mAutoPilotNoProgressFrameCount(0), @@ -440,18 +438,18 @@ LLAgent::LLAgent() : mAutoPilotFinishedCallback(NULL), mAutoPilotCallbackData(NULL), - mMovementKeysLocked(FALSE), + mMovementKeysLocked(false), mEffectColor(new LLUIColor(LLColor4(0.f, 1.f, 1.f, 1.f))), - mHaveHomePosition(FALSE), + mHaveHomePosition(false), mHomeRegionHandle( 0 ), mNearChatRadius(CHAT_NORMAL_RADIUS / 2.f), mNextFidgetTime(0.f), mCurrentFidget(0), mFirstLogin(false), - mOutfitChosen(FALSE), + mOutfitChosen(false), mVoiceConnected(false), @@ -479,7 +477,7 @@ void LLAgent::init() { mMoveTimer.start(); - gSavedSettings.declareBOOL("SlowMotionAnimation", FALSE, "Declared in code", LLControlVariable::PERSIST_NO); + gSavedSettings.declareBOOL("SlowMotionAnimation", false, "Declared in code", LLControlVariable::PERSIST_NO); gSavedSettings.getControl("SlowMotionAnimation")->getSignal()->connect(boost::bind(&handleSlowMotionAnimation, _2)); // *Note: this is where LLViewerCamera::getInstance() used to be constructed. @@ -839,26 +837,26 @@ void LLAgent::movePitch(F32 mag) } // Does this parcel allow you to fly? -BOOL LLAgent::canFly() +bool LLAgent::canFly() { - if (isGodlike()) return TRUE; + if (isGodlike()) return true; LLViewerRegion* regionp = getRegion(); - if (regionp && regionp->getBlockFly()) return FALSE; + if (regionp && regionp->getBlockFly()) return false; LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); - if (!parcel) return FALSE; + if (!parcel) return false; // Allow owners to fly on their own land. if (LLViewerParcelMgr::isParcelOwnedByAgent(parcel, GP_LAND_ALLOW_FLY)) { - return TRUE; + return true; } return parcel->getAllowFly(); } -BOOL LLAgent::getFlying() const +bool LLAgent::getFlying() const { return mControlFlags & AGENT_CONTROL_FLY; } @@ -866,7 +864,7 @@ BOOL LLAgent::getFlying() const //----------------------------------------------------------------------------- // setFlying() //----------------------------------------------------------------------------- -void LLAgent::setFlying(BOOL fly, BOOL fail_sound) +void LLAgent::setFlying(bool fly, bool fail_sound) { if (isAgentAvatarValid()) { @@ -889,7 +887,7 @@ void LLAgent::setFlying(BOOL fly, BOOL fail_sound) if (fly) { - BOOL was_flying = getFlying(); + bool was_flying = getFlying(); if (!canFly() && !was_flying) { // parcel doesn't let you start fly @@ -915,8 +913,6 @@ void LLAgent::setFlying(BOOL fly, BOOL fail_sound) // Update Movement Controls according to Fly mode LLFloaterMove::setFlyingMode(fly); - - mbFlagsDirty = TRUE; } // UI based mechanism of setting fly state @@ -931,7 +927,7 @@ void LLAgent::toggleFlying() LLToolPie::instance().stopClickToWalk(); } - BOOL fly = !gAgent.getFlying(); + bool fly = !gAgent.getFlying(); gAgent.mMoveTimer.reset(); LLFirstUse::notMoving(false); @@ -943,7 +939,7 @@ void LLAgent::toggleFlying() // static bool LLAgent::enableFlying() { - BOOL sitting = FALSE; + bool sitting = false; if (isAgentAvatarValid()) { sitting = gAgentAvatarp->isSitting(); @@ -954,7 +950,7 @@ bool LLAgent::enableFlying() // static bool LLAgent::isSitting() { - BOOL sitting = FALSE; + bool sitting = false; if (isAgentAvatarValid()) { sitting = gAgentAvatarp->isSitting(); @@ -990,9 +986,9 @@ void LLAgent::capabilityReceivedCallback(const LLUUID ®ion_id, LLViewerRegion LLAppViewer::instance()->updateNameLookupUrl(regionp); } - if (gAgent.getInterestListMode() == LLViewerRegion::IL_MODE_360) + if (gAgent.getInterestListMode() == IL_MODE_360) { - gAgent.changeInterestListMode(LLViewerRegion::IL_MODE_360); + gAgent.changeInterestListMode(IL_MODE_360); } } } @@ -1045,7 +1041,6 @@ void LLAgent::setRegion(LLViewerRegion *regionp) { regionp->setCapabilitiesReceivedCallback(LLAgent::capabilityReceivedCallback); } - } else { @@ -1136,7 +1131,7 @@ void LLAgent::removeRegionChangedCallback(boost::signals2::connection callback) //----------------------------------------------------------------------------- // inPrelude() //----------------------------------------------------------------------------- -BOOL LLAgent::inPrelude() +bool LLAgent::inPrelude() { return mRegionp && mRegionp->isPrelude(); } @@ -1153,7 +1148,7 @@ std::string LLAgent::getRegionCapability(const std::string &name) // canManageEstate() //----------------------------------------------------------------------------- -BOOL LLAgent::canManageEstate() const +bool LLAgent::canManageEstate() const { return mRegionp && mRegionp->canManageEstate(); } @@ -1295,7 +1290,7 @@ boost::signals2::connection LLAgent::whenPositionChanged(position_signal_t::slot //----------------------------------------------------------------------------- S32 LLAgent::getRegionsVisited() const { - return mRegionsVisited.size(); + return static_cast<S32>(mRegionsVisited.size()); } //----------------------------------------------------------------------------- @@ -1427,7 +1422,7 @@ LLVector3 LLAgent::getReferenceUpVector() return up_vector; } -// Radians, positive is forward into ground +// Radians, positive is downward toward ground //----------------------------------------------------------------------------- // pitch() //----------------------------------------------------------------------------- @@ -1534,7 +1529,6 @@ U32 LLAgent::getControlFlags() void LLAgent::setControlFlags(U32 mask) { mControlFlags |= mask; - mbFlagsDirty = TRUE; } //----------------------------------------------------------------------------- @@ -1542,28 +1536,7 @@ void LLAgent::setControlFlags(U32 mask) //----------------------------------------------------------------------------- void LLAgent::clearControlFlags(U32 mask) { - U32 old_flags = mControlFlags; mControlFlags &= ~mask; - if (old_flags != mControlFlags) - { - mbFlagsDirty = TRUE; - } -} - -//----------------------------------------------------------------------------- -// controlFlagsDirty() -//----------------------------------------------------------------------------- -BOOL LLAgent::controlFlagsDirty() const -{ - return mbFlagsDirty; -} - -//----------------------------------------------------------------------------- -// enableControlFlagReset() -//----------------------------------------------------------------------------- -void LLAgent::enableControlFlagReset() -{ - mbFlagsNeedReset = TRUE; } //----------------------------------------------------------------------------- @@ -1571,14 +1544,9 @@ void LLAgent::enableControlFlagReset() //----------------------------------------------------------------------------- void LLAgent::resetControlFlags() { - if (mbFlagsNeedReset) - { - mbFlagsNeedReset = FALSE; - mbFlagsDirty = FALSE; - // reset all of the ephemeral flags - // some flags are managed elsewhere - mControlFlags &= AGENT_CONTROL_AWAY | AGENT_CONTROL_FLY | AGENT_CONTROL_MOUSELOOK; - } + // reset all of the ephemeral flags + // some flags are managed elsewhere + mControlFlags &= AGENT_CONTROL_AWAY | AGENT_CONTROL_FLY | AGENT_CONTROL_MOUSELOOK; } //----------------------------------------------------------------------------- @@ -1621,7 +1589,7 @@ void LLAgent::clearAFK() //----------------------------------------------------------------------------- // getAFK() //----------------------------------------------------------------------------- -BOOL LLAgent::getAFK() const +bool LLAgent::getAFK() const { return (mControlFlags & AGENT_CONTROL_AWAY) != 0; } @@ -1657,11 +1625,11 @@ void LLAgent::startAutoPilotGlobal( const LLVector3d &target_global, const std::string& behavior_name, const LLQuaternion *target_rotation, - void (*finish_callback)(BOOL, void *), + void (*finish_callback)(bool, void *), void *callback_data, F32 stop_distance, F32 rot_threshold, - BOOL allow_flying) + bool allow_flying) { if (!isAgentAvatarValid()) { @@ -1718,38 +1686,38 @@ void LLAgent::startAutoPilotGlobal( } else { - mAutoPilotFlyOnStop = FALSE; + mAutoPilotFlyOnStop = false; } if (distance > 30.0 && mAutoPilotAllowFlying) { - setFlying(TRUE); + setFlying(true); } if ( distance > 1.f && mAutoPilotAllowFlying && heightDelta > (sqrtf(mAutoPilotStopDistance) + 1.f)) { - setFlying(TRUE); + setFlying(true); // Do not force flying for "Sit" behavior to prevent flying after pressing "Stand" // from an object. See EXT-1655. if ("Sit" != mAutoPilotBehaviorName) - mAutoPilotFlyOnStop = TRUE; + mAutoPilotFlyOnStop = true; } - mAutoPilot = TRUE; + mAutoPilot = true; setAutoPilotTargetGlobal(target_global); if (target_rotation) { - mAutoPilotUseRotation = TRUE; + mAutoPilotUseRotation = true; mAutoPilotTargetFacing = LLVector3::x_axis * *target_rotation; mAutoPilotTargetFacing.mV[VZ] = 0.f; mAutoPilotTargetFacing.normalize(); } else { - mAutoPilotUseRotation = FALSE; + mAutoPilotUseRotation = false; } mAutoPilotNoProgressFrameCount = 0; @@ -1786,7 +1754,7 @@ void LLAgent::setAutoPilotTargetGlobal(const LLVector3d &target_global) //----------------------------------------------------------------------------- // startFollowPilot() //----------------------------------------------------------------------------- -void LLAgent::startFollowPilot(const LLUUID &leader_id, BOOL allow_flying, F32 stop_distance) +void LLAgent::startFollowPilot(const LLUUID &leader_id, bool allow_flying, F32 stop_distance) { mLeaderID = leader_id; if ( mLeaderID.isNull() ) return; @@ -1811,11 +1779,11 @@ void LLAgent::startFollowPilot(const LLUUID &leader_id, BOOL allow_flying, F32 s //----------------------------------------------------------------------------- // stopAutoPilot() //----------------------------------------------------------------------------- -void LLAgent::stopAutoPilot(BOOL user_cancel) +void LLAgent::stopAutoPilot(bool user_cancel) { if (mAutoPilot) { - mAutoPilot = FALSE; + mAutoPilot = false; if (mAutoPilotUseRotation && !user_cancel) { resetAxes(mAutoPilotTargetFacing); @@ -1872,7 +1840,7 @@ void LLAgent::autoPilot(F32 *delta_yaw) if (gAgentAvatarp->mInAir && mAutoPilotAllowFlying) { - setFlying(TRUE); + setFlying(true); } LLVector3 at; @@ -2075,7 +2043,7 @@ void LLAgent::propagate(const F32 dt) // handle auto-land behavior if (isAgentAvatarValid()) { - BOOL in_air = gAgentAvatarp->mInAir; + bool in_air = gAgentAvatarp->mInAir; LLVector3 land_vel = getVelocity(); land_vel.mV[VZ] = 0.f; @@ -2085,7 +2053,7 @@ void LLAgent::propagate(const F32 dt) && gSavedSettings.getBOOL("AutomaticFly")) { // land automatically - setFlying(FALSE); + setFlying(false); } } @@ -2149,23 +2117,23 @@ std::ostream& operator<<(std::ostream &s, const LLAgent &agent) return s; } -// TRUE if your own avatar needs to be rendered. Usually only +// true if your own avatar needs to be rendered. Usually only // in third person and build. //----------------------------------------------------------------------------- // needsRenderAvatar() //----------------------------------------------------------------------------- -BOOL LLAgent::needsRenderAvatar() +bool LLAgent::needsRenderAvatar() { if (gAgentCamera.cameraMouselook() && !LLVOAvatar::sVisibleInFirstPerson) { - return FALSE; + return false; } return mShowAvatar && mOutfitChosen; } -// TRUE if we need to render your own avatar's head. -BOOL LLAgent::needsRenderHead() +// true if we need to render your own avatar's head. +bool LLAgent::needsRenderHead() { return (LLVOAvatar::sVisibleInFirstPerson && LLPipeline::sReflectionRender) || (mShowAvatar && !gAgentCamera.cameraMouselook()); } @@ -2198,7 +2166,7 @@ void LLAgent::startTyping() sendAnimationRequest(ANIM_AGENT_TYPE, ANIM_REQUEST_START); } (LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"))-> - sendChatFromViewer("", CHAT_TYPE_START, FALSE); + sendChatFromViewer("", CHAT_TYPE_START, false); } //----------------------------------------------------------------------------- @@ -2211,7 +2179,7 @@ void LLAgent::stopTyping() clearRenderState(AGENT_STATE_TYPING); sendAnimationRequest(ANIM_AGENT_TYPE, ANIM_REQUEST_STOP); (LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"))-> - sendChatFromViewer("", CHAT_TYPE_STOP, FALSE); + sendChatFromViewer("", CHAT_TYPE_STOP, false); } } @@ -2286,19 +2254,19 @@ void LLAgent::endAnimationUpdateUI() // show mouse cursor gViewerWindow->showCursor(); // show menus - gMenuBarView->setVisible(TRUE); - LLNavigationBar::getInstance()->setVisible(TRUE && gSavedSettings.getBOOL("ShowNavbarNavigationPanel")); + gMenuBarView->setVisible(true); + LLNavigationBar::getInstance()->setVisible(true && gSavedSettings.getBOOL("ShowNavbarNavigationPanel")); gStatusBar->setVisibleForMouselook(true); static LLCachedControl<bool> show_mini_location_panel(gSavedSettings, "ShowMiniLocationPanel"); if (show_mini_location_panel) { - LLPanelTopInfoBar::getInstance()->setVisible(TRUE); + LLPanelTopInfoBar::getInstance()->setVisible(true); } - LLChicletBar::getInstance()->setVisible(TRUE); + LLChicletBar::getInstance()->setVisible(true); - LLPanelStandStopFlying::getInstance()->setVisible(TRUE); + LLPanelStandStopFlying::getInstance()->setVisible(true); LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset); @@ -2310,7 +2278,7 @@ void LLAgent::endAnimationUpdateUI() } // Only pop if we have pushed... - if (TRUE == mViewsPushed) + if (true == mViewsPushed) { #if 0 // Use this once all floaters are registered LLFloaterReg::restoreVisibleInstances(); @@ -2335,13 +2303,13 @@ void LLAgent::endAnimationUpdateUI() gFloaterView->popVisibleAll(skip_list); #endif - mViewsPushed = FALSE; + mViewsPushed = false; } gAgentCamera.setLookAt(LOOKAT_TARGET_CLEAR); if (gMorphView) { - gMorphView->setVisible( FALSE ); + gMorphView->setVisible( false ); } // Disable mouselook-specific animations @@ -2380,7 +2348,7 @@ void LLAgent::endAnimationUpdateUI() if( gMorphView ) { - gMorphView->setVisible( FALSE ); + gMorphView->setVisible( false ); } if (isAgentAvatarValid()) @@ -2390,7 +2358,7 @@ void LLAgent::endAnimationUpdateUI() sendAnimationRequest(ANIM_AGENT_CUSTOMIZE, ANIM_REQUEST_STOP); sendAnimationRequest(ANIM_AGENT_CUSTOMIZE_DONE, ANIM_REQUEST_START); - mCustomAnim = FALSE ; + mCustomAnim = false ; } } @@ -2406,19 +2374,19 @@ void LLAgent::endAnimationUpdateUI() { // clean up UI // first show anything hidden by UI toggle - gViewerWindow->setUIVisibility(TRUE); + gViewerWindow->setUIVisibility(true); // then hide stuff we want hidden for mouselook gToolBarView->setToolBarsVisible(false); - gMenuBarView->setVisible(FALSE); - LLNavigationBar::getInstance()->setVisible(FALSE); + gMenuBarView->setVisible(false); + LLNavigationBar::getInstance()->setVisible(false); gStatusBar->setVisibleForMouselook(false); - LLPanelTopInfoBar::getInstance()->setVisible(FALSE); + LLPanelTopInfoBar::getInstance()->setVisible(false); - LLChicletBar::getInstance()->setVisible(FALSE); + LLChicletBar::getInstance()->setVisible(false); - LLPanelStandStopFlying::getInstance()->setVisible(FALSE); + LLPanelStandStopFlying::getInstance()->setVisible(false); // clear out camera lag effect gAgentCamera.clearCameraLag(); @@ -2428,7 +2396,7 @@ void LLAgent::endAnimationUpdateUI() LLToolMgr::getInstance()->setCurrentToolset(gMouselookToolset); - mViewsPushed = TRUE; + mViewsPushed = true; if (mMouselookModeInSignal) { @@ -2445,15 +2413,15 @@ void LLAgent::endAnimationUpdateUI() LLFloaterView::skip_list_t skip_list; skip_list.insert(LLFloaterReg::findInstance("mini_map")); skip_list.insert(LLFloaterReg::findInstance("beacons")); - gFloaterView->pushVisibleAll(FALSE, skip_list); + gFloaterView->pushVisibleAll(false, skip_list); #endif if( gMorphView ) { - gMorphView->setVisible(FALSE); + gMorphView->setVisible(false); } - gConsole->setVisible( TRUE ); + gConsole->setVisible( true ); if (isAgentAvatarValid()) { @@ -2502,7 +2470,7 @@ void LLAgent::endAnimationUpdateUI() if( gMorphView ) { - gMorphView->setVisible( TRUE ); + gMorphView->setVisible( true ); } // freeze avatar @@ -2656,9 +2624,9 @@ void LLAgent::setStartPositionSuccess(const LLSD &result) (!result["HomeLocation"]["LocationPos"].has("Z"))) break; - agent_pos.mV[VX] = result["HomeLocation"]["LocationPos"]["X"].asInteger(); - agent_pos.mV[VY] = result["HomeLocation"]["LocationPos"]["Y"].asInteger(); - agent_pos.mV[VZ] = result["HomeLocation"]["LocationPos"]["Z"].asInteger(); + agent_pos.mV[VX] = (F32)result["HomeLocation"]["LocationPos"]["X"].asInteger(); + agent_pos.mV[VY] = (F32)result["HomeLocation"]["LocationPos"]["Y"].asInteger(); + agent_pos.mV[VZ] = (F32)result["HomeLocation"]["LocationPos"]["Z"].asInteger(); error = false; @@ -2772,7 +2740,7 @@ bool LLAgent::canAccessMaturityInRegion( U64 region_handle ) const bool LLAgent::canAccessMaturityAtGlobal( LLVector3d pos_global ) const { - U64 region_handle = to_region_handle_global( pos_global.mdV[0], pos_global.mdV[1] ); + U64 region_handle = to_region_handle_global((F32)pos_global.mdV[0], (F32)pos_global.mdV[1]); return canAccessMaturityInRegion( region_handle ); } @@ -3053,7 +3021,7 @@ bool LLAgent::requestGetCapability(const std::string &capName, httpCallback_t cb return false; } -BOOL LLAgent::getAdminOverride() const +bool LLAgent::getAdminOverride() const { return mAgentAccess->getAdminOverride(); } @@ -3063,7 +3031,7 @@ void LLAgent::setMaturity(char text) mAgentAccess->setMaturity(text); } -void LLAgent::setAdminOverride(BOOL b) +void LLAgent::setAdminOverride(bool b) { mAgentAccess->setAdminOverride(b); } @@ -3115,43 +3083,43 @@ void LLAgent::buildFullnameAndTitle(std::string& name) const } } -BOOL LLAgent::isInGroup(const LLUUID& group_id, BOOL ignore_god_mode /* FALSE */) const +bool LLAgent::isInGroup(const LLUUID& group_id, bool ignore_god_mode /* false */) const { if (!ignore_god_mode && isGodlike()) return true; - U32 count = mGroups.size(); - for(U32 i = 0; i < count; ++i) + auto count = mGroups.size(); + for(size_t i = 0; i < count; ++i) { if(mGroups[i].mID == group_id) { - return TRUE; + return true; } } - return FALSE; + return false; } // This implementation should mirror LLAgentInfo::hasPowerInGroup -BOOL LLAgent::hasPowerInGroup(const LLUUID& group_id, U64 power) const +bool LLAgent::hasPowerInGroup(const LLUUID& group_id, U64 power) const { if (isGodlikeWithoutAdminMenuFakery()) return true; // GP_NO_POWERS can also mean no power is enough to grant an ability. - if (GP_NO_POWERS == power) return FALSE; + if (GP_NO_POWERS == power) return false; - U32 count = mGroups.size(); - for(U32 i = 0; i < count; ++i) + auto count = mGroups.size(); + for(size_t i = 0; i < count; ++i) { if(mGroups[i].mID == group_id) { - return (BOOL)((mGroups[i].mPowers & power) > 0); + return (bool)((mGroups[i].mPowers & power) > 0); } } - return FALSE; + return false; } -BOOL LLAgent::hasPowerInActiveGroup(U64 power) const +bool LLAgent::hasPowerInActiveGroup(U64 power) const { return (mGroupID.notNull() && (hasPowerInGroup(mGroupID, power))); } @@ -3161,8 +3129,8 @@ U64 LLAgent::getPowerInGroup(const LLUUID& group_id) const if (isGodlike()) return GP_ALL_POWERS; - U32 count = mGroups.size(); - for(U32 i = 0; i < count; ++i) + auto count = mGroups.size(); + for(size_t i = 0; i < count; ++i) { if(mGroups[i].mID == group_id) { @@ -3173,24 +3141,24 @@ U64 LLAgent::getPowerInGroup(const LLUUID& group_id) const return GP_NO_POWERS; } -BOOL LLAgent::getGroupData(const LLUUID& group_id, LLGroupData& data) const +bool LLAgent::getGroupData(const LLUUID& group_id, LLGroupData& data) const { - S32 count = mGroups.size(); - for(S32 i = 0; i < count; ++i) + auto count = mGroups.size(); + for(size_t i = 0; i < count; ++i) { if(mGroups[i].mID == group_id) { data = mGroups[i]; - return TRUE; + return true; } } - return FALSE; + return false; } S32 LLAgent::getGroupContribution(const LLUUID& group_id) const { - S32 count = mGroups.size(); - for(S32 i = 0; i < count; ++i) + auto count = mGroups.size(); + for(size_t i = 0; i < count; ++i) { if(mGroups[i].mID == group_id) { @@ -3201,10 +3169,10 @@ S32 LLAgent::getGroupContribution(const LLUUID& group_id) const return 0; } -BOOL LLAgent::setGroupContribution(const LLUUID& group_id, S32 contribution) +bool LLAgent::setGroupContribution(const LLUUID& group_id, S32 contribution) { - S32 count = mGroups.size(); - for(S32 i = 0; i < count; ++i) + auto count = mGroups.size(); + for(size_t i = 0; i < count; ++i) { if(mGroups[i].mID == group_id) { @@ -3218,16 +3186,16 @@ BOOL LLAgent::setGroupContribution(const LLUUID& group_id, S32 contribution) msg->addUUID("GroupID", group_id); msg->addS32("Contribution", contribution); sendReliableMessage(); - return TRUE; + return true; } } - return FALSE; + return false; } -BOOL LLAgent::setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOOL list_in_profile) +bool LLAgent::setUserGroupFlags(const LLUUID& group_id, bool accept_notices, bool list_in_profile) { - S32 count = mGroups.size(); - for(S32 i = 0; i < count; ++i) + auto count = mGroups.size(); + for(size_t i = 0; i < count; ++i) { if(mGroups[i].mID == group_id) { @@ -3244,13 +3212,13 @@ BOOL LLAgent::setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOO msg->nextBlock("NewData"); msg->addBOOL("ListInProfile", list_in_profile); sendReliableMessage(); - return TRUE; + return true; } } - return FALSE; + return false; } -BOOL LLAgent::canJoinGroups() const +bool LLAgent::canJoinGroups() const { return (S32)mGroups.size() < LLAgentBenefitsMgr::current().getGroupMembershipLimit(); } @@ -3296,16 +3264,15 @@ void LLAgent::sendAnimationRequests(const std::vector<LLUUID> &anim_ids, EAnimRe msg->addUUIDFast(_PREHASH_AgentID, getID()); msg->addUUIDFast(_PREHASH_SessionID, getSessionID()); - for (S32 i = 0; i < anim_ids.size(); i++) + for (const LLUUID& uuid : anim_ids) { - if (anim_ids[i].isNull()) + if (uuid.notNull()) { - continue; + msg->nextBlockFast(_PREHASH_AnimationList); + msg->addUUIDFast(_PREHASH_AnimID, uuid); + msg->addBOOLFast(_PREHASH_StartAnim, request == ANIM_REQUEST_START); + num_valid_anims++; } - msg->nextBlockFast(_PREHASH_AnimationList); - msg->addUUIDFast(_PREHASH_AnimID, (anim_ids[i]) ); - msg->addBOOLFast(_PREHASH_StartAnim, (request == ANIM_REQUEST_START) ? TRUE : FALSE); - num_valid_anims++; } msg->nextBlockFast(_PREHASH_PhysicalAvatarEventList); @@ -3330,8 +3297,8 @@ void LLAgent::sendAnimationRequest(const LLUUID &anim_id, EAnimRequest request) msg->addUUIDFast(_PREHASH_SessionID, getSessionID()); msg->nextBlockFast(_PREHASH_AnimationList); - msg->addUUIDFast(_PREHASH_AnimID, (anim_id) ); - msg->addBOOLFast(_PREHASH_StartAnim, (request == ANIM_REQUEST_START) ? TRUE : FALSE); + msg->addUUIDFast(_PREHASH_AnimID, anim_id); + msg->addBOOLFast(_PREHASH_StartAnim, request == ANIM_REQUEST_START); msg->nextBlockFast(_PREHASH_PhysicalAvatarEventList); msg->addBinaryDataFast(_PREHASH_TypeData, NULL, 0); @@ -3355,7 +3322,7 @@ void LLAgent::sendAnimationStateReset() msg->nextBlockFast(_PREHASH_AnimationList); msg->addUUIDFast(_PREHASH_AnimID, LLUUID::null ); - msg->addBOOLFast(_PREHASH_StartAnim, FALSE); + msg->addBOOLFast(_PREHASH_StartAnim, false); msg->nextBlockFast(_PREHASH_PhysicalAvatarEventList); msg->addBinaryDataFast(_PREHASH_TypeData, NULL, 0); @@ -3395,7 +3362,7 @@ void LLAgent::sendWalkRun(bool running) msgsys->nextBlockFast(_PREHASH_AgentData); msgsys->addUUIDFast(_PREHASH_AgentID, getID()); msgsys->addUUIDFast(_PREHASH_SessionID, getSessionID()); - msgsys->addBOOLFast(_PREHASH_AlwaysRun, BOOL(running) ); + msgsys->addBOOLFast(_PREHASH_AlwaysRun, bool(running) ); sendReliableMessage(); } } @@ -3407,23 +3374,23 @@ void LLAgent::friendsChanged() mProxyForAgents = collector.mProxy; } -BOOL LLAgent::isGrantedProxy(const LLPermissions& perm) +bool LLAgent::isGrantedProxy(const LLPermissions& perm) { return (mProxyForAgents.count(perm.getOwner()) > 0); } -BOOL LLAgent::allowOperation(PermissionBit op, +bool LLAgent::allowOperation(PermissionBit op, const LLPermissions& perm, U64 group_proxy_power, U8 god_minimum) { // Check god level. - if (getGodLevel() >= god_minimum) return TRUE; + if (getGodLevel() >= god_minimum) return true; - if (!perm.isOwned()) return FALSE; + if (!perm.isOwned()) return false; // A group member with group_proxy_power can act as owner. - BOOL is_group_owned; + bool is_group_owned; LLUUID owner_id; perm.getOwnership(owner_id, is_group_owned); LLUUID group_id(perm.getGroup()); @@ -3479,37 +3446,37 @@ void LLAgent::initOriginGlobal(const LLVector3d &origin_global) mAgentOriginGlobal = origin_global; } -BOOL LLAgent::leftButtonGrabbed() const +bool LLAgent::leftButtonGrabbed() const { - const BOOL camera_mouse_look = gAgentCamera.cameraMouselook(); + const bool camera_mouse_look = gAgentCamera.cameraMouselook(); return (!camera_mouse_look && mControlsTakenCount[CONTROL_LBUTTON_DOWN_INDEX] > 0) || (camera_mouse_look && mControlsTakenCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0) || (!camera_mouse_look && mControlsTakenPassedOnCount[CONTROL_LBUTTON_DOWN_INDEX] > 0) || (camera_mouse_look && mControlsTakenPassedOnCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0); } -BOOL LLAgent::rotateGrabbed() const +bool LLAgent::rotateGrabbed() const { return (mControlsTakenCount[CONTROL_YAW_POS_INDEX] > 0) || (mControlsTakenCount[CONTROL_YAW_NEG_INDEX] > 0); } -BOOL LLAgent::forwardGrabbed() const +bool LLAgent::forwardGrabbed() const { return (mControlsTakenCount[CONTROL_AT_POS_INDEX] > 0); } -BOOL LLAgent::backwardGrabbed() const +bool LLAgent::backwardGrabbed() const { return (mControlsTakenCount[CONTROL_AT_NEG_INDEX] > 0); } -BOOL LLAgent::upGrabbed() const +bool LLAgent::upGrabbed() const { return (mControlsTakenCount[CONTROL_UP_POS_INDEX] > 0); } -BOOL LLAgent::downGrabbed() const +bool LLAgent::downGrabbed() const { return (mControlsTakenCount[CONTROL_UP_NEG_INDEX] > 0); } @@ -3805,9 +3772,9 @@ void LLAgent::processScriptControlChange(LLMessageSystem *msg, void **) S32 block_count = msg->getNumberOfBlocks("Data"); for (S32 block_index = 0; block_index < block_count; block_index++) { - BOOL take_controls; + bool take_controls; U32 controls; - BOOL passon; + bool passon; U32 i; msg->getBOOL("Data", "TakeControls", take_controls, block_index); if (take_controls) @@ -3929,19 +3896,19 @@ void LLAgent::processControlRelease(LLMessageSystem *msg, void **) } */ -BOOL LLAgent::anyControlGrabbed() const +bool LLAgent::anyControlGrabbed() const { for (U32 i = 0; i < TOTAL_CONTROLS; i++) { if (gAgent.mControlsTakenCount[i] > 0) - return TRUE; + return true; if (gAgent.mControlsTakenPassedOnCount[i] > 0) - return TRUE; + return true; } - return FALSE; + return false; } -BOOL LLAgent::isControlGrabbed(S32 control_index) const +bool LLAgent::isControlGrabbed(S32 control_index) const { return mControlsTakenCount[control_index] > 0; } @@ -3957,22 +3924,22 @@ void LLAgent::forceReleaseControls() void LLAgent::setHomePosRegion( const U64& region_handle, const LLVector3& pos_region) { - mHaveHomePosition = TRUE; + mHaveHomePosition = true; mHomeRegionHandle = region_handle; mHomePosRegion = pos_region; } -BOOL LLAgent::getHomePosGlobal( LLVector3d* pos_global ) +bool LLAgent::getHomePosGlobal( LLVector3d* pos_global ) { if(!mHaveHomePosition) { - return FALSE; + return false; } F32 x = 0; F32 y = 0; from_region_handle( mHomeRegionHandle, &x, &y); pos_global->setVec( x + mHomePosRegion.mV[VX], y + mHomePosRegion.mV[VY], mHomePosRegion.mV[VZ] ); - return TRUE; + return true; } bool LLAgent::isInHomeRegion() @@ -4055,7 +4022,7 @@ bool LLAgent::teleportCore(bool is_local) // Close all pie menus, deselect land, etc. // Don't change the camera until we know teleport succeeded. JC - gAgentCamera.resetView(FALSE); + gAgentCamera.resetView(false); // local logic add(LLStatViewer::TELEPORT, 1); @@ -4066,16 +4033,12 @@ bool LLAgent::teleportCore(bool is_local) } else { - gTeleportDisplay = TRUE; + gTeleportDisplay = true; LL_INFOS("Teleport") << "Non-local, setting teleport state to TELEPORT_START" << LL_ENDL; gAgent.setTeleportState( LLAgent::TELEPORT_START ); } make_ui_sound("UISndTeleportOut"); - // MBW -- Let the voice client know a teleport has begun so it can leave the existing channel. - // This was breaking the case of teleporting within a single sim. Backing it out for now. -// LLVoiceClient::getInstance()->leaveChannel(); - return true; } @@ -4099,7 +4062,7 @@ void LLAgent::clearTeleportRequest() { if(LLVoiceClient::instanceExists()) { - LLVoiceClient::getInstance()->setHidden(FALSE); + LLVoiceClient::getInstance()->setHidden(false); } mTeleportRequest.reset(); mTPNeedsNeabyChatSeparator = false; @@ -4129,7 +4092,7 @@ void LLAgent::startTeleportRequest() LL_INFOS("Telport") << "Agent handling start teleport request." << LL_ENDL; if(LLVoiceClient::instanceExists()) { - LLVoiceClient::getInstance()->setHidden(TRUE); + LLVoiceClient::getInstance()->setHidden(true); } if (hasPendingTeleportRequest()) { @@ -4137,7 +4100,7 @@ void LLAgent::startTeleportRequest() mTeleportCanceled.reset(); if (!isMaturityPreferenceSyncedWithServer()) { - gTeleportDisplay = TRUE; + gTeleportDisplay = true; LL_INFOS("Teleport") << "Maturity preference not synced yet, setting teleport state to TELEPORT_PENDING" << LL_ENDL; setTeleportState(TELEPORT_PENDING); } @@ -4212,13 +4175,13 @@ void LLAgent::handleTeleportFailed() LL_WARNS("Teleport") << "Agent handling teleport failure!" << LL_ENDL; if(LLVoiceClient::instanceExists()) { - LLVoiceClient::getInstance()->setHidden(FALSE); + LLVoiceClient::getInstance()->setHidden(false); } setTeleportState(LLAgent::TELEPORT_NONE); // Unlock the UI if the progress bar has been shown. -// gViewerWindow->setShowProgress(FALSE); -// gTeleportDisplay = FALSE; +// gViewerWindow->setShowProgress(false); +// gTeleportDisplay = false; if (mTeleportRequest) { @@ -4264,14 +4227,14 @@ void LLAgent::addTPNearbyChatSeparator() LLChat chat; chat.mFromName = location_name; - chat.mMuted = FALSE; + chat.mMuted = false; chat.mFromID = LLUUID::null; chat.mSourceType = CHAT_SOURCE_TELEPORT; chat.mChatStyle = CHAT_STYLE_TELEPORT_SEP; chat.mText = ""; LLSD args; - args["do_not_log"] = TRUE; + args["do_not_log"] = true; nearby_chat->addMessage(chat, true, args); } } @@ -4354,13 +4317,13 @@ void LLAgent::doTeleportViaLandmark(const LLUUID& landmark_asset_id) } } -void LLAgent::teleportViaLure(const LLUUID& lure_id, BOOL godlike) +void LLAgent::teleportViaLure(const LLUUID& lure_id, bool godlike) { mTeleportRequest = LLTeleportRequestPtr(new LLTeleportRequestViaLure(lure_id, godlike)); startTeleportRequest(); } -void LLAgent::doTeleportViaLure(const LLUUID& lure_id, BOOL godlike) +void LLAgent::doTeleportViaLure(const LLUUID& lure_id, bool godlike) { LLViewerRegion* regionp = getRegion(); if(regionp && teleportCore()) @@ -4426,7 +4389,7 @@ void LLAgent::restoreCanceledTeleportRequest() gAgent.setTeleportState( LLAgent::TELEPORT_REQUESTED ); mTeleportRequest = mTeleportCanceled; mTeleportCanceled.reset(); - gTeleportDisplay = TRUE; + gTeleportDisplay = true; gTeleportDisplayTimer.reset(); } } @@ -4504,7 +4467,7 @@ void LLAgent::doTeleportViaLocationLookAt(const LLVector3d& pos_global) if(!gAgentCamera.isfollowCamLocked()) { - gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); // detach camera form avatar, so it keeps direction + gAgentCamera.setFocusOnAvatar(false, ANIMATE); // detach camera form avatar, so it keeps direction } U64 region_handle = to_region_handle(pos_global); @@ -4588,7 +4551,7 @@ void LLAgent::stopCurrentAnimations() else { // stop this animation locally - gAgentAvatarp->stopMotion(anim_it->first, TRUE); + gAgentAvatarp->stopMotion(anim_it->first, true); // ...and tell the server to tell everyone. anim_ids.push_back(anim_it->first); } @@ -4684,7 +4647,7 @@ void LLAgent::requestEnterGodMode() msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); msg->nextBlockFast(_PREHASH_RequestBlock); - msg->addBOOLFast(_PREHASH_Godlike, TRUE); + msg->addBOOLFast(_PREHASH_Godlike, true); msg->addUUIDFast(_PREHASH_Token, LLUUID::null); // simulators need to know about your request @@ -4699,7 +4662,7 @@ void LLAgent::requestLeaveGodMode() msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); msg->nextBlockFast(_PREHASH_RequestBlock); - msg->addBOOLFast(_PREHASH_Godlike, FALSE); + msg->addBOOLFast(_PREHASH_Godlike, false); msg->addUUIDFast(_PREHASH_Token, LLUUID::null); // simulator needs to know about your request @@ -4891,7 +4854,7 @@ const std::string& LLAgent::getTeleportStateName() const void LLAgent::parseTeleportMessages(const std::string& xml_filename) { LLXMLNodePtr root; - BOOL success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root); + bool success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root); if (!success || !root || !root->hasName( "teleport_messages" )) { @@ -4986,6 +4949,218 @@ void LLAgent::renderAutoPilotTarget() } } +static U64 g_lastUpdateTime { 0 }; +static F32 g_deltaTime { 0.0f }; +static S32 g_lastUpdateFrame { 0 }; +static S32 g_deltaFrame { 0 }; + +void LLAgent::applyExternalActionFlags(U32 outer_flags) +{ + llassert(LLCoros::on_main_thread_main_coro()); + assert(LLGameControl::isEnabled() && LLGameControl::willControlAvatar()); + mExternalActionFlags = outer_flags; + + // HACK: AGENT_CONTROL_NUDGE_AT_NEG is used to toggle Flycam + if ((mExternalActionFlags & AGENT_CONTROL_NUDGE_AT_NEG) > 0) + { + if (mToggleFlycam) + { + mUsingFlycam = !mUsingFlycam; + if (mUsingFlycam) + { + // copy main camera transform to flycam + LLViewerCamera* camera = LLViewerCamera::getInstance(); + mFlycam.setTransform(camera->getOrigin(), camera->getQuaternion()); + mFlycam.setView(camera->getView()); + mLastFlycamUpdate = LLFrameTimer::getTotalTime(); + } + } + mToggleFlycam = false; + } + else + { + mToggleFlycam = true; + } + + // measure delta time and frame + // Note: it is possible for the deltas to be very large + // and it is the duty of the code that uses them to clamp as necessary + U64 now = LLFrameTimer::getTotalTime(); + g_deltaTime = F32(now - g_lastUpdateTime) / (F32)(USEC_PER_SEC); + g_lastUpdateTime = now; + + S32 frame_count = LLFrameTimer::getFrameCount(); + g_deltaFrame = frame_count - g_lastUpdateFrame; + g_lastUpdateFrame = frame_count; + + if (mUsingFlycam) + { + // Flycam will be updated later by exernal context + return; + } + + S32 direction = (S32)(mExternalActionFlags & AGENT_CONTROL_AT_POS) + - (S32)((mExternalActionFlags & AGENT_CONTROL_AT_NEG) >> 1); + if (direction != 0) + { + moveAt(direction); + } + + static U32 last_non_fly_frame = 0; + static U64 last_non_fly_time = 0; + direction = (S32)(mExternalActionFlags & AGENT_CONTROL_UP_POS) + - (S32)((mExternalActionFlags & AGENT_CONTROL_UP_NEG) >> 1); + if (direction != 0) + { + // HACK: this auto-fly logic based on original code still extant in llviewerinput.cpp::agent_jump() + // but has been cleaned up. + // TODO?: DRY this logic + if (direction > 0) + { + if (!getFlying() + && !upGrabbed() + && gSavedSettings.getBOOL("AutomaticFly")) + { + constexpr F32 FLY_TIME = 0.5f; + constexpr U32 FLY_FRAMES = 4; + F32 delta_time = (F32)(now - last_non_fly_time) / (F32)(USEC_PER_SEC); + U32 delta_frames = frame_count - last_non_fly_frame; + if( delta_time > FLY_TIME + && delta_frames > FLY_FRAMES) + { + setFlying(true); + } + } + } + else + { + last_non_fly_frame = frame_count; + last_non_fly_time = now; + } + + moveUp(direction); + } + else if (!getFlying()) + { + last_non_fly_frame = frame_count; + last_non_fly_time = now; + } + + direction = (S32)(mExternalActionFlags & AGENT_CONTROL_LEFT_POS) + - (S32)((mExternalActionFlags & AGENT_CONTROL_LEFT_NEG) >> 1); + if (direction != 0) + { + moveLeft(direction); + } + + direction = (S32)(mExternalActionFlags & AGENT_CONTROL_YAW_POS) + - (S32)((mExternalActionFlags & AGENT_CONTROL_YAW_NEG) >> 1); + if (direction != 0) + { + F32 sign = (direction < 0 ? -1.0f : 1.0f); + // HACK: hard-code 3.0 seconds for YawRate measure. It is simpler, + // and the missing variable yaw rate is unnoticeable. + moveYaw(sign * LLFloaterMove::getYawRate(3.0f)); + } + + { + F32 pitch = ((mExternalActionFlags & AGENT_CONTROL_PITCH_POS) > 0 ? 1.0f : 0.0f) + - ((mExternalActionFlags & AGENT_CONTROL_PITCH_NEG) > 0 ? 1.0f : 0.0f); + movePitch(pitch); + } + + if ((mExternalActionFlags & AGENT_CONTROL_FLY) > 0) + { + if (mToggleFly) + { + setFlying(!getFlying()); + } + mToggleFly = false; + } + else + { + mToggleFly = true; + } + + if (mExternalActionFlags & AGENT_CONTROL_STOP) + { + setControlFlags(AGENT_CONTROL_STOP); + } + + // HACK: AGENT_CONTROL_NUDGE_AT_POS is used to toggle running + if ((mExternalActionFlags & AGENT_CONTROL_NUDGE_AT_POS) > 0) + { + if (mToggleRun) + { + if (getRunning()) + { + clearRunning(); + sendWalkRun(false); + } + else + { + setRunning(); + sendWalkRun(true); + } + } + mToggleRun = false; + } + else + { + mToggleRun = true; + } +} + +void LLAgent::pressGameControlButton(U8 button_index) +{ + mGameControlButtonsFromKeys |= (1U << button_index); +} + +void LLAgent::releaseGameControlButton(U8 button_index) +{ + mGameControlButtonsFromKeys &= !(1U << button_index); +} + +void LLAgent::updateFlycam() +{ + // Note: flycam_inputs arrive in range [-1,1] + std::vector<F32> flycam_inputs; + LLGameControl::getFlycamInputs(flycam_inputs); + + // Note: no matter how flycam_inputs are mapped to the controller + // they arrive in the following order: + constexpr S32 FLYCAM_ADVANCE = 0; + constexpr S32 FLYCAM_PAN = 1; + constexpr S32 FLYCAM_RISE = 2; + constexpr S32 FLYCAM_PITCH = 3; + constexpr S32 FLYCAM_YAW = 4; + constexpr S32 FLYCAM_ZOOM = 5; + + LLVector3 linear_velocity( + flycam_inputs[FLYCAM_ADVANCE], + flycam_inputs[FLYCAM_PAN], + flycam_inputs[FLYCAM_RISE]); + constexpr F32 MAX_FLYCAM_SPEED = 10.0f; + mFlycam.setLinearVelocity(MAX_FLYCAM_SPEED * linear_velocity); + + mFlycam.setPitchRate(flycam_inputs[FLYCAM_PITCH]); + mFlycam.setYawRate(flycam_inputs[FLYCAM_YAW]); + mFlycam.setZoomRate(flycam_inputs[FLYCAM_ZOOM]); + + mFlycam.integrate(g_deltaTime); + + LLVector3 pos; + LLQuaternion rot; + mFlycam.getTransform(pos, rot); + LLMatrix3 mat(rot); + LLViewerCamera::getInstance()->setOrigin(pos); + LLViewerCamera::getInstance()->mXAxis = LLVector3(mat.mMatrix[0]); + LLViewerCamera::getInstance()->mYAxis = LLVector3(mat.mMatrix[1]); + LLViewerCamera::getInstance()->mZAxis = LLVector3(mat.mMatrix[2]); + + LLViewerCamera::getInstance()->setView(mFlycam.getView()); +} + /********************************************************************************/ //----------------------------------------------------------------------------- @@ -5079,7 +5254,7 @@ void LLTeleportRequestViaLandmark::restartTeleport() // LLTeleportRequestViaLure //----------------------------------------------------------------------------- -LLTeleportRequestViaLure::LLTeleportRequestViaLure(const LLUUID &pLureId, BOOL pIsLureGodLike) +LLTeleportRequestViaLure::LLTeleportRequestViaLure(const LLUUID &pLureId, bool pIsLureGodLike) : LLTeleportRequestViaLandmark(pLureId), mIsLureGodLike(pIsLureGodLike) { |