From 8d2f7a526545a10cd3669bf837a0b6f02cf5fe71 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 15 Oct 2012 19:43:35 -0700 Subject: SH-3405 WIP convert existing stats to lltrace system converted all remaining LLViewerStats to lltrace --- indra/newview/llagent.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 447836910d..a41efbe0b2 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -753,7 +753,8 @@ void LLAgent::setFlying(BOOL fly) } if( !was_flying ) { - LLViewerStats::getInstance()->incStat(LLViewerStats::ST_FLY_COUNT); + LLStatViewer::FLY.add(1); + //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_FLY_COUNT); } setControlFlags(AGENT_CONTROL_FLY); } @@ -3809,7 +3810,8 @@ bool LLAgent::teleportCore(bool is_local) gAgentCamera.resetView(FALSE); // local logic - LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TELEPORT_COUNT); + LLStatViewer::TELEPORT.add(1); + //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TELEPORT_COUNT); if (is_local) { gAgent.setTeleportState( LLAgent::TELEPORT_LOCAL ); @@ -4120,7 +4122,7 @@ void LLAgent::setTeleportState(ETeleportState state) case TELEPORT_ARRIVING: // First two position updates after a teleport tend to be weird - LLViewerStats::getInstance()->mAgentPositionSnaps.mCountOfNextUpdatesToIgnore = 2; + //LLViewerStats::getInstance()->mAgentPositionSnaps.mCountOfNextUpdatesToIgnore = 2; // Let the interested parties know we've teleported. LLViewerParcelMgr::getInstance()->onTeleportFinished(false, getPositionGlobal()); -- cgit v1.2.3 From a52d203a4f1d2988e8ffba16258f3f132f22f56d Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 17 Oct 2012 20:00:07 -0700 Subject: SH-3405 WIP convert existing stats to lltrace system started conversion of llviewerassetstats removed old, dead LLViewerStats code made units tracing require units declaration clean up of units handling --- indra/newview/llagent.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index a41efbe0b2..ac33f09718 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -754,7 +754,6 @@ void LLAgent::setFlying(BOOL fly) if( !was_flying ) { LLStatViewer::FLY.add(1); - //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_FLY_COUNT); } setControlFlags(AGENT_CONTROL_FLY); } @@ -3811,7 +3810,6 @@ bool LLAgent::teleportCore(bool is_local) // local logic LLStatViewer::TELEPORT.add(1); - //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TELEPORT_COUNT); if (is_local) { gAgent.setTeleportState( LLAgent::TELEPORT_LOCAL ); -- cgit v1.2.3 From f07b9c2c69f1f6882dcf249aacf33cdfacf878ab Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 6 Mar 2013 11:08:25 -0800 Subject: renamed LLTrace stat gathering classes/methods to make the structure of LLTrace clearer Count becomes CountStatHandle Count.sum becomes sum(Count, value), etc. --- indra/newview/llagent.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 14235bcee4..4fb298df13 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -752,7 +752,7 @@ void LLAgent::setFlying(BOOL fly) } if( !was_flying ) { - LLStatViewer::FLY.add(1); + add(LLStatViewer::FLY, 1); } setControlFlags(AGENT_CONTROL_FLY); } @@ -3806,7 +3806,7 @@ bool LLAgent::teleportCore(bool is_local) gAgentCamera.resetView(FALSE); // local logic - LLStatViewer::TELEPORT.add(1); + add(LLStatViewer::TELEPORT, 1); if (is_local) { gAgent.setTeleportState( LLAgent::TELEPORT_LOCAL ); -- cgit v1.2.3 From 1f507c3cfca0c7722ebeaf71883fbaa83988e1a9 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 21 Mar 2013 00:37:20 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics copied over scene load frame differencing changes from viewer-interesting made periodicrecording flexible enough to allow for indefinite number of periods added scene loading stats floater fixed collapsing behavior of container views --- indra/newview/llagent.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 4fb298df13..4e60127ef3 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1046,6 +1046,14 @@ const LLVector3d &LLAgent::getPositionGlobal() const return mPositionGlobal; } +bool LLAgent::isPositionChanged() const +{ + LLVector3d diff; + diff = mPositionGlobal - mLastPositionGlobal; + + return diff.lengthSquared() > 1.0; +} + //----------------------------------------------------------------------------- // getPositionAgent() //----------------------------------------------------------------------------- -- cgit v1.2.3 From 6b81b8629e67d82a7620e48781ded73b6e6126ea Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Sun, 5 May 2013 17:45:35 -0700 Subject: Spring cleaning: removed unused .cpp and.h files, and cleaned up header dependencies --- indra/newview/llagent.cpp | 50 +++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 4e60127ef3..2e0fc039c4 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -2852,10 +2852,10 @@ BOOL LLAgent::isInGroup(const LLUUID& group_id, BOOL ignore_god_mode /* FALSE */ if (!ignore_god_mode && isGodlike()) return true; - S32 count = mGroups.count(); - for(S32 i = 0; i < count; ++i) + U32 count = mGroups.size(); + for(U32 i = 0; i < count; ++i) { - if(mGroups.get(i).mID == group_id) + if(mGroups[i].mID == group_id) { return TRUE; } @@ -2872,12 +2872,12 @@ BOOL LLAgent::hasPowerInGroup(const LLUUID& group_id, U64 power) const // GP_NO_POWERS can also mean no power is enough to grant an ability. if (GP_NO_POWERS == power) return FALSE; - S32 count = mGroups.count(); - for(S32 i = 0; i < count; ++i) + U32 count = mGroups.size(); + for(U32 i = 0; i < count; ++i) { - if(mGroups.get(i).mID == group_id) + if(mGroups[i].mID == group_id) { - return (BOOL)((mGroups.get(i).mPowers & power) > 0); + return (BOOL)((mGroups[i].mPowers & power) > 0); } } return FALSE; @@ -2893,12 +2893,12 @@ U64 LLAgent::getPowerInGroup(const LLUUID& group_id) const if (isGodlike()) return GP_ALL_POWERS; - S32 count = mGroups.count(); - for(S32 i = 0; i < count; ++i) + U32 count = mGroups.size(); + for(U32 i = 0; i < count; ++i) { - if(mGroups.get(i).mID == group_id) + if(mGroups[i].mID == group_id) { - return (mGroups.get(i).mPowers); + return (mGroups[i].mPowers); } } @@ -2907,12 +2907,12 @@ U64 LLAgent::getPowerInGroup(const LLUUID& group_id) const BOOL LLAgent::getGroupData(const LLUUID& group_id, LLGroupData& data) const { - S32 count = mGroups.count(); + S32 count = mGroups.size(); for(S32 i = 0; i < count; ++i) { - if(mGroups.get(i).mID == group_id) + if(mGroups[i].mID == group_id) { - data = mGroups.get(i); + data = mGroups[i]; return TRUE; } } @@ -2921,12 +2921,12 @@ BOOL LLAgent::getGroupData(const LLUUID& group_id, LLGroupData& data) const S32 LLAgent::getGroupContribution(const LLUUID& group_id) const { - S32 count = mGroups.count(); + S32 count = mGroups.size(); for(S32 i = 0; i < count; ++i) { - if(mGroups.get(i).mID == group_id) + if(mGroups[i].mID == group_id) { - S32 contribution = mGroups.get(i).mContribution; + S32 contribution = mGroups[i].mContribution; return contribution; } } @@ -2935,12 +2935,12 @@ S32 LLAgent::getGroupContribution(const LLUUID& group_id) const BOOL LLAgent::setGroupContribution(const LLUUID& group_id, S32 contribution) { - S32 count = mGroups.count(); + S32 count = mGroups.size(); for(S32 i = 0; i < count; ++i) { - if(mGroups.get(i).mID == group_id) + if(mGroups[i].mID == group_id) { - mGroups.get(i).mContribution = contribution; + mGroups[i].mContribution = contribution; LLMessageSystem* msg = gMessageSystem; msg->newMessage("SetGroupContribution"); msg->nextBlock("AgentData"); @@ -2958,13 +2958,13 @@ BOOL LLAgent::setGroupContribution(const LLUUID& group_id, S32 contribution) BOOL LLAgent::setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOOL list_in_profile) { - S32 count = mGroups.count(); + S32 count = mGroups.size(); for(S32 i = 0; i < count; ++i) { - if(mGroups.get(i).mID == group_id) + if(mGroups[i].mID == group_id) { - mGroups.get(i).mAcceptNotices = accept_notices; - mGroups.get(i).mListInProfile = list_in_profile; + mGroups[i].mAcceptNotices = accept_notices; + mGroups[i].mListInProfile = list_in_profile; LLMessageSystem* msg = gMessageSystem; msg->newMessage("SetGroupAcceptNotices"); msg->nextBlock("AgentData"); @@ -2984,7 +2984,7 @@ BOOL LLAgent::setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOO BOOL LLAgent::canJoinGroups() const { - return mGroups.count() < gMaxAgentGroups; + return (S32)mGroups.size() < gMaxAgentGroups; } LLQuaternion LLAgent::getHeadRotation() -- cgit v1.2.3 From 3a0e45ff088278cba5314974be6539b05009b8da Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 10 May 2013 17:57:12 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics renamed LLView::handleVisibilityChange to onVisibilityChange to reflect standard naming conventions for handlers vs. reactors --- indra/newview/llagent.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 2e0fc039c4..6b996edb76 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1046,14 +1046,6 @@ const LLVector3d &LLAgent::getPositionGlobal() const return mPositionGlobal; } -bool LLAgent::isPositionChanged() const -{ - LLVector3d diff; - diff = mPositionGlobal - mLastPositionGlobal; - - return diff.lengthSquared() > 1.0; -} - //----------------------------------------------------------------------------- // getPositionAgent() //----------------------------------------------------------------------------- -- cgit v1.2.3 From a2e22732f195dc075a733c79f15156752f522a43 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 30 Jul 2013 19:13:45 -0700 Subject: Summer cleaning - removed a lot of llcommon dependencies to speed up build times consolidated most indra-specific constants in llcommon under indra_constants.h fixed issues with operations on mixed unit types (implicit and explicit) made LL_INFOS() style macros variadic in order to subsume other logging methods such as ll_infos added optional tag output to error recorders --- indra/newview/llagent.cpp | 45 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 23 deletions(-) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 8ec74bb268..460ae62522 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -2991,7 +2991,7 @@ LLQuaternion LLAgent::getHeadRotation() return rot; } -void LLAgent::sendAnimationRequests(LLDynamicArray &anim_ids, EAnimRequest request) +void LLAgent::sendAnimationRequests(const std::vector &anim_ids, EAnimRequest request) { if (gAgentID.isNull()) { @@ -3006,7 +3006,7 @@ void LLAgent::sendAnimationRequests(LLDynamicArray &anim_ids, EAnimReque msg->addUUIDFast(_PREHASH_AgentID, getID()); msg->addUUIDFast(_PREHASH_SessionID, getSessionID()); - for (S32 i = 0; i < anim_ids.count(); i++) + for (S32 i = 0; i < anim_ids.size(); i++) { if (anim_ids[i].isNull()) { @@ -3204,10 +3204,10 @@ void LLAgent::processAgentDropGroup(LLMessageSystem *msg, void **) // Remove the group if it already exists remove it and add the new data to pick up changes. LLGroupData gd; gd.mID = group_id; - S32 index = gAgent.mGroups.find(gd); - if (index != -1) + std::vector::iterator found_it = std::find(gAgent.mGroups.begin(), gAgent.mGroups.end(), gd); + if (found_it != gAgent.mGroups.end()) { - gAgent.mGroups.remove(index); + gAgent.mGroups.erase(found_it); if (gAgent.getGroupID() == group_id) { gAgent.mGroupID.setNull(); @@ -3281,10 +3281,10 @@ class LLAgentDropGroupViewerNode : public LLHTTPNode // and add the new data to pick up changes. LLGroupData gd; gd.mID = group_id; - S32 index = gAgent.mGroups.find(gd); - if (index != -1) + std::vector::iterator found_it = std::find(gAgent.mGroups.begin(), gAgent.mGroups.end(), gd); + if (found_it != gAgent.mGroups.end()) { - gAgent.mGroups.remove(index); + gAgent.mGroups.erase(found_it); if (gAgent.getGroupID() == group_id) { gAgent.mGroupID.setNull(); @@ -3337,7 +3337,6 @@ void LLAgent::processAgentGroupDataUpdate(LLMessageSystem *msg, void **) S32 count = msg->getNumberOfBlocksFast(_PREHASH_GroupData); LLGroupData group; - S32 index = -1; bool need_floater_update = false; for(S32 i = 0; i < count; ++i) { @@ -3352,12 +3351,12 @@ void LLAgent::processAgentGroupDataUpdate(LLMessageSystem *msg, void **) { need_floater_update = true; // Remove the group if it already exists remove it and add the new data to pick up changes. - index = gAgent.mGroups.find(group); - if (index != -1) + std::vector::iterator found_it = std::find(gAgent.mGroups.begin(), gAgent.mGroups.end(), group); + if (found_it != gAgent.mGroups.end()) { - gAgent.mGroups.remove(index); + gAgent.mGroups.erase(found_it); } - gAgent.mGroups.put(group); + gAgent.mGroups.push_back(group); } if (need_floater_update) { @@ -3396,7 +3395,6 @@ class LLAgentGroupDataUpdateViewerNode : public LLHTTPNode { LLGroupData group; - S32 index = -1; bool need_floater_update = false; group.mID = (*iter_group)["GroupID"].asUUID(); @@ -3413,12 +3411,12 @@ class LLAgentGroupDataUpdateViewerNode : public LLHTTPNode { need_floater_update = true; // Remove the group if it already exists remove it and add the new data to pick up changes. - index = gAgent.mGroups.find(group); - if (index != -1) + std::vector::iterator found_it = std::find(gAgent.mGroups.begin(), gAgent.mGroups.end(), group); + if (found_it != gAgent.mGroups.end()) { - gAgent.mGroups.remove(index); + gAgent.mGroups.erase(found_it); } - gAgent.mGroups.put(group); + gAgent.mGroups.push_back(group); } if (need_floater_update) { @@ -4203,11 +4201,12 @@ void LLAgent::fidget() void LLAgent::stopFidget() { - LLDynamicArray anims; - anims.put(ANIM_AGENT_STAND_1); - anims.put(ANIM_AGENT_STAND_2); - anims.put(ANIM_AGENT_STAND_3); - anims.put(ANIM_AGENT_STAND_4); + std::vector anims; + anims.reserve(4); + anims.push_back(ANIM_AGENT_STAND_1); + anims.push_back(ANIM_AGENT_STAND_2); + anims.push_back(ANIM_AGENT_STAND_3); + anims.push_back(ANIM_AGENT_STAND_4); gAgent.sendAnimationRequests(anims, ANIM_REQUEST_STOP); } -- cgit v1.2.3 From e340009fc59d59e59b2e8d903a884acb76b178eb Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 9 Aug 2013 17:11:19 -0700 Subject: second phase summer cleaning replace llinfos, lldebugs, etc with new LL_INFOS(), LL_DEBUGS(), etc. --- indra/newview/llagent.cpp | 100 +++++++++++++++++++++++----------------------- 1 file changed, 50 insertions(+), 50 deletions(-) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 460ae62522..2d7008b4ef 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -811,7 +811,7 @@ void LLAgent::standUp() void LLAgent::handleServerBakeRegionTransition(const LLUUID& region_id) { - llinfos << "called" << llendl; + LL_INFOS() << "called" << LL_ENDL; // Old-style appearance entering a server-bake region. @@ -819,7 +819,7 @@ void LLAgent::handleServerBakeRegionTransition(const LLUUID& region_id) !gAgentAvatarp->isUsingServerBakes() && (mRegionp->getCentralBakeVersion()>0)) { - llinfos << "update requested due to region transition" << llendl; + LL_INFOS() << "update requested due to region transition" << LL_ENDL; LLAppearanceMgr::instance().requestServerAppearanceUpdate(); } // new-style appearance entering a non-bake region, @@ -846,8 +846,8 @@ void LLAgent::setRegion(LLViewerRegion *regionp) // host_name = regionp->getHost().getHostName(); std::string ip = regionp->getHost().getString(); - llinfos << "Moving agent into region: " << regionp->getName() - << " located at " << ip << llendl; + LL_INFOS() << "Moving agent into region: " << regionp->getName() + << " located at " << ip << LL_ENDL; if (mRegionp) { // We've changed regions, we're now going to change our agent coordinate frame. @@ -989,12 +989,12 @@ void LLAgent::sendMessage() { if (gDisconnected) { - llwarns << "Trying to send message when disconnected!" << llendl; + LL_WARNS() << "Trying to send message when disconnected!" << LL_ENDL; return; } if (!mRegionp) { - llerrs << "No region for agent yet!" << llendl; + LL_ERRS() << "No region for agent yet!" << LL_ENDL; return; } gMessageSystem->sendMessage(mRegionp->getHost()); @@ -1008,12 +1008,12 @@ void LLAgent::sendReliableMessage() { if (gDisconnected) { - lldebugs << "Trying to send message when disconnected!" << llendl; + LL_DEBUGS() << "Trying to send message when disconnected!" << LL_ENDL; return; } if (!mRegionp) { - lldebugs << "LLAgent::sendReliableMessage No region for agent yet, not sending message!" << llendl; + LL_DEBUGS() << "LLAgent::sendReliableMessage No region for agent yet, not sending message!" << LL_ENDL; return; } gMessageSystem->sendReliable(mRegionp->getHost()); @@ -1042,7 +1042,7 @@ void LLAgent::setPositionAgent(const LLVector3 &pos_agent) { if (!pos_agent.isFinite()) { - llerrs << "setPositionAgent is not a number" << llendl; + LL_ERRS() << "setPositionAgent is not a number" << LL_ENDL; } if (isAgentAvatarValid() && gAgentAvatarp->getParent()) @@ -1166,7 +1166,7 @@ void LLAgent::resetAxes(const LLVector3 &look_at) LLVector3 cross(look_at % skyward); if (cross.isNull()) { - llinfos << "LLAgent::resetAxes cross-product is zero" << llendl; + LL_INFOS() << "LLAgent::resetAxes cross-product is zero" << LL_ENDL; return; } @@ -2297,7 +2297,7 @@ void LLAgent::setStartPosition( U32 location_id ) object = gObjectList.findObject(gAgentID); if (! object) { - llinfos << "setStartPosition - Can't find agent viewerobject id " << gAgentID << llendl; + LL_INFOS() << "setStartPosition - Can't find agent viewerobject id " << gAgentID << LL_ENDL; return; } // we've got the viewer object @@ -2398,7 +2398,7 @@ void LLAgent::requestStopMotion( LLMotion* motion ) // if motion is not looping, it could have stopped by running out of time // so we need to tell the server this -// llinfos << "Sending stop for motion " << motion->getName() << llendl; +// LL_INFOS() << "Sending stop for motion " << motion->getName() << LL_ENDL; sendAnimationRequest( anim_state, ANIM_REQUEST_STOP ); } @@ -2561,19 +2561,19 @@ void LLMaturityPreferencesResponder::result(const LLSD &pContent) if (actualMaturity != mPreferredMaturity) { - llwarns << "while attempting to change maturity preference from '" << LLViewerRegion::accessToString(mPreviousMaturity) + LL_WARNS() << "while attempting to change maturity preference from '" << LLViewerRegion::accessToString(mPreviousMaturity) << "' to '" << LLViewerRegion::accessToString(mPreferredMaturity) << "', the server responded with '" << LLViewerRegion::accessToString(actualMaturity) << "' [value:" << static_cast(actualMaturity) << ", llsd:" - << pContent << "]" << llendl; + << pContent << "]" << LL_ENDL; } mAgent->handlePreferredMaturityResult(actualMaturity); } void LLMaturityPreferencesResponder::errorWithContent(U32 pStatus, const std::string& pReason, const LLSD& pContent) { - llwarns << "while attempting to change maturity preference from '" << LLViewerRegion::accessToString(mPreviousMaturity) + LL_WARNS() << "while attempting to change maturity preference from '" << LLViewerRegion::accessToString(mPreviousMaturity) << "' to '" << LLViewerRegion::accessToString(mPreferredMaturity) << "', we got an error with [status:" - << pStatus << "]: " << (pContent.isDefined() ? pContent : LLSD(pReason)) << llendl; + << pStatus << "]: " << (pContent.isDefined() ? pContent : LLSD(pReason)) << LL_ENDL; mAgent->handlePreferredMaturityError(); } @@ -2622,8 +2622,8 @@ void LLAgent::handlePreferredMaturityResult(U8 pServerMaturity) // server by re-sending our last known request. Cap the re-tries at 3 just to be safe. else if (++mMaturityPreferenceNumRetries <= 3) { - llinfos << "Retrying attempt #" << mMaturityPreferenceNumRetries << " to set viewer preferred maturity to '" - << LLViewerRegion::accessToString(mLastKnownRequestMaturity) << "'" << llendl; + LL_INFOS() << "Retrying attempt #" << mMaturityPreferenceNumRetries << " to set viewer preferred maturity to '" + << LLViewerRegion::accessToString(mLastKnownRequestMaturity) << "'" << LL_ENDL; sendMaturityPreferenceToServer(mLastKnownRequestMaturity); } // Else, the viewer is style out of sync with the server after 3 retries, so inform the user @@ -2650,8 +2650,8 @@ void LLAgent::handlePreferredMaturityError() // the server, but not quite sure why we are if (mLastKnownRequestMaturity == mLastKnownResponseMaturity) { - llwarns << "Got an error but maturity preference '" << LLViewerRegion::accessToString(mLastKnownRequestMaturity) - << "' seems to be in sync with the server" << llendl; + LL_WARNS() << "Got an error but maturity preference '" << LLViewerRegion::accessToString(mLastKnownRequestMaturity) + << "' seems to be in sync with the server" << LL_ENDL; reportPreferredMaturitySuccess(); } // Else, the more likely case is that the last request does not match the last response, @@ -2705,7 +2705,7 @@ void LLAgent::reportPreferredMaturityError() { bool tmpIsDoSendMaturityPreferenceToServer = mIsDoSendMaturityPreferenceToServer; mIsDoSendMaturityPreferenceToServer = false; - llinfos << "Setting viewer preferred maturity to '" << LLViewerRegion::accessToString(mLastKnownResponseMaturity) << "'" << llendl; + LL_INFOS() << "Setting viewer preferred maturity to '" << LLViewerRegion::accessToString(mLastKnownResponseMaturity) << "'" << LL_ENDL; gSavedSettings.setU32("PreferredMaturity", static_cast(mLastKnownResponseMaturity)); mIsDoSendMaturityPreferenceToServer = tmpIsDoSendMaturityPreferenceToServer; } @@ -2754,8 +2754,8 @@ void LLAgent::sendMaturityPreferenceToServer(U8 pPreferredMaturity) LLSD body = LLSD::emptyMap(); body["access_prefs"] = access_prefs; - llinfos << "Sending viewer preferred maturity to '" << LLViewerRegion::accessToString(pPreferredMaturity) - << "' via capability to: " << url << llendl; + LL_INFOS() << "Sending viewer preferred maturity to '" << LLViewerRegion::accessToString(pPreferredMaturity) + << "' via capability to: " << url << LL_ENDL; LLSD headers; LLHTTPClient::post(url, body, responderPtr, headers, 30.0f); } @@ -3194,7 +3194,7 @@ void LLAgent::processAgentDropGroup(LLMessageSystem *msg, void **) if (agent_id != gAgentID) { - llwarns << "processAgentDropGroup for agent other than me" << llendl; + LL_WARNS() << "processAgentDropGroup for agent other than me" << LL_ENDL; return; } @@ -3225,7 +3225,7 @@ void LLAgent::processAgentDropGroup(LLMessageSystem *msg, void **) } else { - llwarns << "processAgentDropGroup, agent is not part of group " << group_id << llendl; + LL_WARNS() << "processAgentDropGroup, agent is not part of group " << group_id << LL_ENDL; } } @@ -3258,7 +3258,7 @@ class LLAgentDropGroupViewerNode : public LLHTTPNode body["AgentData"].isArray() && body["AgentData"][0].isMap() ) { - llinfos << "VALID DROP GROUP" << llendl; + LL_INFOS() << "VALID DROP GROUP" << LL_ENDL; //there is only one set of data in the AgentData block LLSD agent_data = body["AgentData"][0]; @@ -3270,8 +3270,8 @@ class LLAgentDropGroupViewerNode : public LLHTTPNode if (agent_id != gAgentID) { - llwarns - << "AgentDropGroup for agent other than me" << llendl; + LL_WARNS() + << "AgentDropGroup for agent other than me" << LL_ENDL; response->notFound(); return; @@ -3302,9 +3302,9 @@ class LLAgentDropGroupViewerNode : public LLHTTPNode } else { - llwarns + LL_WARNS() << "AgentDropGroup, agent is not part of group " - << group_id << llendl; + << group_id << LL_ENDL; } response->result(LLSD()); @@ -3331,7 +3331,7 @@ void LLAgent::processAgentGroupDataUpdate(LLMessageSystem *msg, void **) if (agent_id != gAgentID) { - llwarns << "processAgentGroupDataUpdate for agent other than me" << llendl; + LL_WARNS() << "processAgentGroupDataUpdate for agent other than me" << LL_ENDL; return; } @@ -3380,7 +3380,7 @@ class LLAgentGroupDataUpdateViewerNode : public LLHTTPNode if (agent_id != gAgentID) { - llwarns << "processAgentGroupDataUpdate for agent other than me" << llendl; + LL_WARNS() << "processAgentGroupDataUpdate for agent other than me" << LL_ENDL; return; } @@ -3438,7 +3438,7 @@ void LLAgent::processAgentDataUpdate(LLMessageSystem *msg, void **) if (agent_id != gAgentID) { - llwarns << "processAgentDataUpdate for agent other than me" << llendl; + LL_WARNS() << "processAgentDataUpdate for agent other than me" << LL_ENDL; return; } @@ -3606,7 +3606,7 @@ void LLAgent::processAgentCachedTextureResponse(LLMessageSystem *mesgsys, void * if (!isAgentAvatarValid() || gAgentAvatarp->isDead()) { - llwarns << "No avatar for user in cached texture update!" << llendl; + LL_WARNS() << "No avatar for user in cached texture update!" << LL_ENDL; return; } @@ -3643,7 +3643,7 @@ void LLAgent::processAgentCachedTextureResponse(LLMessageSystem *mesgsys, void * { if (texture_id.notNull()) { - //llinfos << "Received cached texture " << (U32)texture_index << ": " << texture_id << llendl; + //LL_INFOS() << "Received cached texture " << (U32)texture_index << ": " << texture_id << LL_ENDL; gAgentAvatarp->setCachedBakedTexture((ETextureIndex)texture_index, texture_id); //gAgentAvatarp->setTETexture( LLVOAvatar::sBakedTextureIndices[texture_index], texture_id ); gAgentQueryManager.mActiveCacheQueries[baked_index] = 0; @@ -3658,7 +3658,7 @@ void LLAgent::processAgentCachedTextureResponse(LLMessageSystem *mesgsys, void * } } } - llinfos << "Received cached texture response for " << num_results << " textures." << llendl; + LL_INFOS() << "Received cached texture response for " << num_results << " textures." << LL_ENDL; gAgentAvatarp->outputRezTiming("Fetched agent wearables textures from cache. Will now load them"); gAgentAvatarp->updateMeshTextures(); @@ -3736,7 +3736,7 @@ bool LLAgent::teleportCore(bool is_local) { if ((TELEPORT_NONE != mTeleportState) && (mTeleportState != TELEPORT_PENDING)) { - llwarns << "Attempt to teleport when already teleporting." << llendl; + LL_WARNS() << "Attempt to teleport when already teleporting." << LL_ENDL; return false; } @@ -4046,7 +4046,7 @@ void LLAgent::doTeleportViaLocation(const LLVector3d& pos_global) else if(regionp && teleportCore(regionp->getHandle() == to_region_handle_global((F32)pos_global.mdV[VX], (F32)pos_global.mdV[VY]))) { - llwarns << "Using deprecated teleportlocationrequest." << llendl; + LL_WARNS() << "Using deprecated teleportlocationrequest." << LL_ENDL; // send the message LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_TeleportLocationRequest); @@ -4257,7 +4257,7 @@ void LLAgent::dumpSentAppearance(const std::string& dump_prefix) } else { - LL_DEBUGS("Avatar") << "dumping sent appearance message to " << fullpath << llendl; + LL_DEBUGS("Avatar") << "dumping sent appearance message to " << fullpath << LL_ENDL; } LLVisualParam* appearance_version_param = gAgentAvatarp->getVisualParam(11000); @@ -4300,7 +4300,7 @@ void LLAgent::sendAgentSetAppearance() gAgentAvatarp->bakedTextureOriginCounts(sb_count, host_count, both_count, neither_count); if (both_count != 0 || neither_count != 0) { - llwarns << "bad bake texture state " << sb_count << "," << host_count << "," << both_count << "," << neither_count << llendl; + LL_WARNS() << "bad bake texture state " << sb_count << "," << host_count << "," << both_count << "," << neither_count << LL_ENDL; } if (sb_count != 0 && host_count == 0) { @@ -4312,7 +4312,7 @@ void LLAgent::sendAgentSetAppearance() } else if (sb_count + host_count > 0) { - llwarns << "unclear baked texture state, not sending appearance" << llendl; + LL_WARNS() << "unclear baked texture state, not sending appearance" << LL_ENDL; return; } @@ -4356,7 +4356,7 @@ void LLAgent::sendAgentSetAppearance() // IMG_DEFAULT_AVATAR means not baked. 0 index should be ignored for baked textures if (!gAgentAvatarp->isTextureDefined(texture_index, 0)) { - LL_DEBUGS("Avatar") << "texture not current for baked " << (S32)baked_index << " local " << (S32)texture_index << llendl; + LL_DEBUGS("Avatar") << "texture not current for baked " << (S32)baked_index << " local " << (S32)texture_index << LL_ENDL; textures_current = FALSE; break; } @@ -4424,7 +4424,7 @@ void LLAgent::sendAgentSetAppearance() } } - //llinfos << "Avatar XML num VisualParams transmitted = " << transmitted_params << llendl; + //LL_INFOS() << "Avatar XML num VisualParams transmitted = " << transmitted_params << LL_ENDL; sendReliableMessage(); } @@ -4465,8 +4465,8 @@ void LLAgent::parseTeleportMessages(const std::string& xml_filename) if (!success || !root || !root->hasName( "teleport_messages" )) { - llerrs << "Problem reading teleport string XML file: " - << xml_filename << llendl; + LL_ERRS() << "Problem reading teleport string XML file: " + << xml_filename << LL_ENDL; return; } @@ -4530,11 +4530,11 @@ void LLAgent::sendAgentUpdateUserInfo(bool im_via_email, const std::string& dire // static void LLAgent::dumpGroupInfo() { - llinfos << "group " << gAgent.mGroupName << llendl; - llinfos << "ID " << gAgent.mGroupID << llendl; - llinfos << "powers " << gAgent.mGroupPowers << llendl; - llinfos << "title " << gAgent.mGroupTitle << llendl; - //llinfos << "insig " << gAgent.mGroupInsigniaID << llendl; + LL_INFOS() << "group " << gAgent.mGroupName << LL_ENDL; + LL_INFOS() << "ID " << gAgent.mGroupID << LL_ENDL; + LL_INFOS() << "powers " << gAgent.mGroupPowers << LL_ENDL; + LL_INFOS() << "title " << gAgent.mGroupTitle << LL_ENDL; + //LL_INFOS() << "insig " << gAgent.mGroupInsigniaID << LL_ENDL; } // Draw a representation of current autopilot target -- cgit v1.2.3 From f713fe492f8b86a0743e0a553d62f06ff62500bb Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 30 Aug 2013 11:02:15 -0600 Subject: fix for SH-4295: Interesting: Teleporting to previous location leave some objects invisible. --- indra/newview/llagent.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 2d7008b4ef..a7bd628d5a 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -3802,6 +3802,7 @@ bool LLAgent::teleportCore(bool is_local) //release geometry from old location gPipeline.resetVertexBuffers(); + LLSpatialPartition::sTeleportRequested = TRUE; } make_ui_sound("UISndTeleportOut"); -- cgit v1.2.3 From 01098f5daba77e12fe739a3c8eaa722a95b83ea9 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Mon, 9 Sep 2013 11:29:25 -0600 Subject: eliminate some redundant geometry rebuilding operations during teleporting --- indra/newview/llagent.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index a7bd628d5a..d7965c1e8f 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -4015,6 +4015,7 @@ void LLAgent::teleportCancel() } clearTeleportRequest(); gAgent.setTeleportState( LLAgent::TELEPORT_NONE ); + gPipeline.resetVertexBuffers(); } -- cgit v1.2.3