diff options
author | Alexander Gavriliuk <alexandrgproductengine@lindenlab.com> | 2024-04-30 14:17:09 +0200 |
---|---|---|
committer | Guru <alexandrgproductengine@lindenlab.com> | 2024-05-01 23:31:07 +0200 |
commit | 23729442aab7130f3368d433e8a5a9dd45ff6b98 (patch) | |
tree | f50d8a671c3b8cda39f7e03aa1fef8cbcd8d68d9 /indra | |
parent | c05c066894c7a49fb8a3dba553bac56216398934 (diff) |
secondlife/viewer#1359 Introduce enum ERezzedStatus
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llavatarrenderinfoaccountant.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llavatarrendernotifier.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llavatarrendernotifier.h | 4 | ||||
-rw-r--r-- | indra/newview/llvoavatar.cpp | 211 | ||||
-rw-r--r-- | indra/newview/llvoavatar.h | 40 | ||||
-rw-r--r-- | indra/newview/llvoavatarself.cpp | 15 |
6 files changed, 138 insertions, 136 deletions
diff --git a/indra/newview/llavatarrenderinfoaccountant.cpp b/indra/newview/llavatarrenderinfoaccountant.cpp index b95b971890..d7a9bc5715 100644 --- a/indra/newview/llavatarrenderinfoaccountant.cpp +++ b/indra/newview/llavatarrenderinfoaccountant.cpp @@ -231,7 +231,7 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoReportCoro(std::string url, U { LLVOAvatar* avatar = dynamic_cast<LLVOAvatar*>(*iter); if (avatar && - avatar->getRezzedStatus() >= 2 && // Mostly rezzed (maybe without baked textures downloaded) + avatar->getRezzedStatus() >= AV_REZZED_TEXTURED && // Mostly rezzed (maybe without baked textures downloaded) !avatar->isDead() && // Not dead yet !avatar->isControlAvatar() && // Not part of an animated object avatar->getObjectHost() == regionp->getHost()) // Ensure it's on the same region diff --git a/indra/newview/llavatarrendernotifier.cpp b/indra/newview/llavatarrendernotifier.cpp index 8b09f7903d..b249565646 100644 --- a/indra/newview/llavatarrendernotifier.cpp +++ b/indra/newview/llavatarrendernotifier.cpp @@ -70,7 +70,7 @@ mLatestOverLimitPct(0.0f), mShowOverLimitAgents(false), mNotifyOutfitLoading(false), mLastCofVersion(LLViewerInventoryCategory::VERSION_UNKNOWN), -mLastOutfitRezStatus(-1), +mLastOutfitRezStatus(AV_REZZED_UNKNOWN), mLastSkeletonSerialNum(-1) { mPopUpDelayTimer.resetWithExpiry(OVER_LIMIT_UPDATE_DELAY); diff --git a/indra/newview/llavatarrendernotifier.h b/indra/newview/llavatarrendernotifier.h index 37130bfcf6..f30b6b3612 100644 --- a/indra/newview/llavatarrendernotifier.h +++ b/indra/newview/llavatarrendernotifier.h @@ -33,6 +33,8 @@ class LLViewerRegion; +enum ERezzedStatus : S32; + struct LLHUDComplexity { LLHUDComplexity() @@ -130,7 +132,7 @@ private: S32 mLastSkeletonSerialNum; // Used to detect changes in voavatar's rezzed status. // If value decreases - there were changes in outfit. - S32 mLastOutfitRezStatus; + enum ERezzedStatus mLastOutfitRezStatus; object_complexity_list_t mObjectComplexityList; }; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 8ecfa3eed1..ab2c59e80a 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -212,7 +212,7 @@ const S32 MIN_NONTUNED_AVS = 5; enum ERenderName { RENDER_NAME_NEVER, - RENDER_NAME_ALWAYS, + RENDER_NAME_ALWAYS, RENDER_NAME_FADE }; @@ -574,7 +574,7 @@ private: // joint states to be animated //------------------------------------------------------------------------- LLPointer<LLJointState> mPelvisState; - LLCharacter* mCharacter; + LLCharacter* mCharacter; }; /** @@ -677,15 +677,15 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mVisuallyMuteSetting(AV_RENDER_NORMALLY), mMutedAVColor(LLColor4::white /* used for "uninitialize" */), mFirstFullyVisible(TRUE), - mFirstUseDelaySeconds(FIRST_APPEARANCE_CLOUD_MIN_DELAY), mFullyLoaded(FALSE), mPreviousFullyLoaded(FALSE), mFullyLoadedInitialized(FALSE), + mFullyLoadedFrameCounter(0), mVisualComplexity(VISUAL_COMPLEXITY_UNKNOWN), mLoadedCallbacksPaused(FALSE), mLoadedCallbackTextures(0), mRenderUnloadedAvatar(LLCachedControl<bool>(gSavedSettings, "RenderUnloadedAvatar", false)), - mLastRezzedStatus(-1), + mLastRezzedStatus(AV_REZZED_UNKNOWN), mIsEditingAppearance(FALSE), mUseLocalAppearance(FALSE), mLastUpdateRequestCOFVersion(-1), @@ -799,10 +799,10 @@ void LLVOAvatar::debugAvatarRezTime(std::string notification_name, std::string c if (gSavedSettings.getBOOL("DebugAvatarRezTime")) { LLSD args; - args["EXISTENCE"] = llformat("%d",(U32)mDebugExistenceTimer.getElapsedTimeF32()); - args["TIME"] = llformat("%d",(U32)mRuthDebugTimer.getElapsedTimeF32()); + args["EXISTENCE"] = llformat("%d", (U32)mDebugExistenceTimer.getElapsedTimeF32()); + args["TIME"] = llformat("%d", (U32)mRuthDebugTimer.getElapsedTimeF32()); args["NAME"] = getFullname(); - LLNotificationsUtil::add(notification_name,args); + LLNotificationsUtil::add(notification_name, args); } } @@ -813,14 +813,14 @@ LLVOAvatar::~LLVOAvatar() { if (!mFullyLoaded) { - debugAvatarRezTime("AvatarRezLeftCloudNotification","left after ruth seconds as cloud"); + debugAvatarRezTime("AvatarRezLeftCloudNotification", "left after ruth seconds as cloud"); } else { - debugAvatarRezTime("AvatarRezLeftNotification","left sometime after declouding"); + debugAvatarRezTime("AvatarRezLeftNotification", "left sometime after declouding"); } - if(mTuned) + if (mTuned) { LLPerfStats::tunedAvatars--; mTuned = false; @@ -917,14 +917,34 @@ BOOL LLVOAvatar::hasGray() const return !getIsCloud() && !isFullyTextured(); } -S32 LLVOAvatar::getRezzedStatus() const +ERezzedStatus LLVOAvatar::getRezzedStatus() const { - if (getIsCloud()) return 0; - bool textured = isFullyTextured(); - if (textured && allBakedTexturesCompletelyDownloaded()) return 3; - if (textured) return 2; - llassert(hasGray()); - return 1; // gray + if (getIsCloud()) + return AV_REZZED_CLOUD; + if (!isFullyTextured()) + return AV_REZZED_GRAY; + if (!allBakedTexturesCompletelyDownloaded()) + return AV_REZZED_TEXTURED; // "downloading" + return AV_REZZED_FULL; +} + +// static +std::string LLVOAvatar::rezStatusToString(ERezzedStatus rez_status) +{ + switch (rez_status) + { + case AV_REZZED_CLOUD: + return "cloud"; + case AV_REZZED_GRAY: + return "gray"; + case AV_REZZED_TEXTURED: + return "downloading"; + case AV_REZZED_FULL: + return "full"; + default: + ; + } + return "unknown"; } void LLVOAvatar::deleteLayerSetCaches(bool clearAll) @@ -953,15 +973,10 @@ BOOL LLVOAvatar::areAllNearbyInstancesBaked(S32& grey_avatars) { BOOL res = TRUE; grey_avatars = 0; - for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin(); - iter != LLCharacter::sInstances.end(); ++iter) + for (LLCharacter* character : LLCharacter::sInstances) { - LLVOAvatar* inst = (LLVOAvatar*) *iter; - if( inst->isDead() ) - { - continue; - } - else if( !inst->isFullyBaked() ) + LLVOAvatar* inst = (LLVOAvatar*)character; + if (!inst->isDead() && !inst->isFullyBaked()) { res = FALSE; if (inst->mHasGrey) @@ -974,33 +989,6 @@ BOOL LLVOAvatar::areAllNearbyInstancesBaked(S32& grey_avatars) } // static -void LLVOAvatar::getNearbyRezzedStats(std::vector<S32>& counts) -{ - counts.clear(); - counts.resize(4); - for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin(); - iter != LLCharacter::sInstances.end(); ++iter) - { - LLVOAvatar* inst = (LLVOAvatar*) *iter; - if (inst) - { - S32 rez_status = inst->getRezzedStatus(); - counts[rez_status]++; - } - } -} - -// static -std::string LLVOAvatar::rezStatusToString(S32 rez_status) -{ - if (rez_status==0) return "cloud"; - if (rez_status==1) return "gray"; - if (rez_status==2) return "downloading"; - if (rez_status==3) return "full"; - return "unknown"; -} - -// static void LLVOAvatar::dumpBakedStatus() { LLVector3d camera_pos_global = gAgentCamera.getCameraPositionGlobal(); @@ -2679,7 +2667,7 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time) // no need for high frequency compl_upd_freq = 100; } - else if (mLastRezzedStatus <= 0) //cloud or init + else if (mLastRezzedStatus <= AV_REZZED_CLOUD) // cloud or initial { compl_upd_freq = 60; } @@ -2687,11 +2675,11 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time) { compl_upd_freq = 5; } - else if (mLastRezzedStatus == 1) //'grey', not fully loaded + else if (mLastRezzedStatus == AV_REZZED_GRAY) // 'gray', not fully loaded { compl_upd_freq = 40; } - else if (isInMuteList()) //cheap, buffers value from search + else if (isInMuteList()) // cheap, buffers value from search { compl_upd_freq = 100; } @@ -3055,17 +3043,17 @@ F32 LLVOAvatar::calcMorphAmount() void LLVOAvatar::idleUpdateLipSync(bool voice_enabled) { // Use the Lipsync_Ooh and Lipsync_Aah morphs for lip sync - if ( voice_enabled - && mLastRezzedStatus > 0 // no point updating lip-sync for clouds + if (voice_enabled + && mLastRezzedStatus > AV_REZZED_CLOUD // no point updating lip-sync for clouds && (LLVoiceClient::getInstance()->lipSyncEnabled()) - && LLVoiceClient::getInstance()->getIsSpeaking( mID ) ) + && LLVoiceClient::getInstance()->getIsSpeaking(mID)) { F32 ooh_morph_amount = 0.0f; F32 aah_morph_amount = 0.0f; mVoiceVisualizer->lipSyncOohAah( ooh_morph_amount, aah_morph_amount ); - if( mOohMorph ) + if (mOohMorph) { F32 ooh_weight = mOohMorph->getMinWeight() + ooh_morph_amount * (mOohMorph->getMaxWeight() - mOohMorph->getMinWeight()); @@ -3073,7 +3061,7 @@ void LLVOAvatar::idleUpdateLipSync(bool voice_enabled) mOohMorph->setWeight( ooh_weight); } - if( mAahMorph ) + if (mAahMorph) { F32 aah_weight = mAahMorph->getMinWeight() + aah_morph_amount * (mAahMorph->getMaxWeight() - mAahMorph->getMinWeight()); @@ -4165,16 +4153,16 @@ void LLVOAvatar::computeUpdatePeriod() // impostor camera near clip plane mUpdatePeriod = 1; } - else if ( shouldImpostor(4.0) ) + else if (shouldImpostor(4.0)) { //background avatars are REALLY slow updating impostors mUpdatePeriod = UPDATE_RATE_SLOW; } - else if (mLastRezzedStatus <= 0) + else if (mLastRezzedStatus <= AV_REZZED_CLOUD) { // Don't update cloud avatars too often mUpdatePeriod = UPDATE_RATE_SLOW; } - else if ( shouldImpostor(3.0) ) + else if (shouldImpostor(3.0)) { //back 25% of max visible avatars are slow updating impostors mUpdatePeriod = UPDATE_RATE_MED; } @@ -8056,10 +8044,10 @@ bool LLVOAvatar::getIsCloud() const ); } -void LLVOAvatar::updateRezzedStatusTimers(S32 rez_status) +void LLVOAvatar::updateRezzedStatusTimers(ERezzedStatus rez_status) { - // State machine for rezzed status. Statuses are -1 on startup, 0 - // = cloud, 1 = gray, 2 = downloading, 3 = full. + // State machine for rezzed status. + // Statuses are -1 on startup, 0 = cloud, 1 = gray, 2 = downloading, 3 = full. // Purpose is to collect time data for each it takes avatar to reach // various loading landmarks: gray, textured (partial), textured fully. @@ -8067,10 +8055,10 @@ void LLVOAvatar::updateRezzedStatusTimers(S32 rez_status) { LL_DEBUGS("Avatar") << avString() << "rez state change: " << mLastRezzedStatus << " -> " << rez_status << LL_ENDL; - if (mLastRezzedStatus == -1 && rez_status != -1) + if (mLastRezzedStatus == AV_REZZED_UNKNOWN && rez_status != AV_REZZED_UNKNOWN) { // First time initialization, start all timers. - for (S32 i = 1; i < 4; i++) + for (ERezzedStatus i = AV_REZZED_GRAY; i <= AV_REZZED_FULL; ++(S32&)i) { startPhase("load_" + LLVOAvatar::rezStatusToString(i)); startPhase("first_load_" + LLVOAvatar::rezStatusToString(i)); @@ -8079,7 +8067,7 @@ void LLVOAvatar::updateRezzedStatusTimers(S32 rez_status) if (rez_status < mLastRezzedStatus) { // load level has decreased. start phase timers for higher load levels. - for (S32 i = rez_status+1; i <= mLastRezzedStatus; i++) + for (ERezzedStatus i = next(rez_status); i <= mLastRezzedStatus; ++(S32&)i) { startPhase("load_" + LLVOAvatar::rezStatusToString(i)); } @@ -8087,21 +8075,22 @@ void LLVOAvatar::updateRezzedStatusTimers(S32 rez_status) else if (rez_status > mLastRezzedStatus) { // load level has increased. stop phase timers for lower and equal load levels. - for (S32 i = llmax(mLastRezzedStatus+1,1); i <= rez_status; i++) + for (ERezzedStatus i = llmax(next(mLastRezzedStatus), AV_REZZED_GRAY); i <= rez_status; ++(S32&)i) { stopPhase("load_" + LLVOAvatar::rezStatusToString(i)); stopPhase("first_load_" + LLVOAvatar::rezStatusToString(i), false); } - if (rez_status == 3) + if (rez_status == AV_REZZED_FULL) { // "fully loaded", mark any pending appearance change complete. selfStopPhase("update_appearance_from_cof"); selfStopPhase("wear_inventory_category", false); selfStopPhase("process_initial_wearables_update", false); - updateVisualComplexity(); + updateVisualComplexity(); } } + mLastRezzedStatus = rez_status; } } @@ -8232,18 +8221,18 @@ void LLVOAvatar::logMetricsTimerRecord(const std::string& phase_name, F32 elapse // returns true if the value has changed. BOOL LLVOAvatar::updateIsFullyLoaded() { - S32 rez_status = getRezzedStatus(); + ERezzedStatus rez_status = getRezzedStatus(); bool loading = getIsCloud(); if (mFirstFullyVisible && !mIsControlAvatar) { - loading = ((rez_status < 2) + loading = ((rez_status < AV_REZZED_TEXTURED) // Wait at least 60s for unfinished textures to finish on first load, // don't wait forever, it might fail. Even if it will eventually load by // itself and update mLoadedCallbackTextures (or fail and clean the list), // avatars are more time-sensitive than textures and can't wait that long. || (mLoadedCallbackTextures < mCallbackTextureList.size() && mLastTexCallbackAddedTime.getElapsedTimeF32() < MAX_TEXTURE_WAIT_TIME_SEC) || !mPendingAttachment.empty() - || (rez_status < 3 && !isFullyBaked()) + || (rez_status < AV_REZZED_FULL && !isFullyBaked()) || hasPendingAttachedMeshes() ); } @@ -8283,56 +8272,53 @@ void LLVOAvatar::updateRuthTimer(bool loading) BOOL LLVOAvatar::processFullyLoadedChange(bool loading) { - // We wait a little bit before giving the 'all clear', to let things to - // settle down (models to snap into place, textures to get first packets). - // And if viewer isn't aware of some parts yet, this gives them a chance - // to arrive. - const F32 LOADED_DELAY = 1.f; - if (loading) { mFullyLoadedTimer.reset(); + mFullyLoaded = false; } + else if (!mFullyLoaded) + { + // We wait a little bit before giving the 'all clear', to let things to settle down: + // models to snap into place, textures to get first packets, LODs to load. + const F32 LOADED_DELAY = 1.f; - if (mFirstFullyVisible) - { - if (!isSelf() && loading) + F32 delay = LOADED_DELAY; + if (mFirstFullyVisible && !isSelf() && loading) { - // Note that textures can causes 60s delay on thier own - // so this delay might end up on top of textures' delay - mFirstUseDelaySeconds = llclamp( - mFirstAppearanceMessageTimer.getElapsedTimeF32(), - FIRST_APPEARANCE_CLOUD_MIN_DELAY, - FIRST_APPEARANCE_CLOUD_MAX_DELAY); - - if (shouldImpostor()) - { - // Impostors are less of a priority, - // let them stay cloud longer - mFirstUseDelaySeconds *= 1.25; - } + delay = mFirstAppearanceMessageTimer.getElapsedTimeF32(); + // Note that textures can causes 60s delay on thier own + // so this delay might end up on top of textures' delay + delay = llclamp( + mFirstAppearanceMessageTimer.getElapsedTimeF32(), + FIRST_APPEARANCE_CLOUD_MIN_DELAY, + FIRST_APPEARANCE_CLOUD_MAX_DELAY); + + if (shouldImpostor()) + { + // Impostors are less of a priority, + // let them stay cloud longer + delay *= 1.25; + } } - mFullyLoaded = (mFullyLoadedTimer.getElapsedTimeF32() > mFirstUseDelaySeconds); - } - else - { - mFullyLoaded = (mFullyLoadedTimer.getElapsedTimeF32() > LOADED_DELAY); - } - if (!mPreviousFullyLoaded && !loading && mFullyLoaded) - { - debugAvatarRezTime("AvatarRezNotification","fully loaded"); - } + mFullyLoaded = mFullyLoadedTimer.getElapsedTimeF32() > delay; + + if (!mPreviousFullyLoaded && !loading && mFullyLoaded) + { + debugAvatarRezTime("AvatarRezNotification", "fully loaded"); + } + } // did our loading state "change" from last call? // FIXME runway - why are we updating every 30 calls even if nothing has changed? // This causes updateLOD() to run every 30 frames, among other things. + BOOL fully_loaded_changed = (mFullyLoaded != mPreviousFullyLoaded); const S32 UPDATE_RATE = 30; BOOL changed = - ((mFullyLoaded != mPreviousFullyLoaded) || // if the value is different from the previous call - (!mFullyLoadedInitialized) || // if we've never been called before - (mFullyLoadedFrameCounter % UPDATE_RATE == 0)); // every now and then issue a change - BOOL fully_loaded_changed = (mFullyLoaded != mPreviousFullyLoaded); + (fully_loaded_changed || // if the value is different from the previous call + !mFullyLoadedInitialized || // if we've never been called before + (mFullyLoadedFrameCounter % UPDATE_RATE == 0)); // every now and then issue a change mPreviousFullyLoaded = mFullyLoaded; mFullyLoadedInitialized = TRUE; @@ -8349,7 +8335,8 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading) // Fix for jellydoll initially invisible mNeedsImpostorUpdate = TRUE; mLastImpostorUpdateReason = 6; - } + } + return changed; } diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 4bb0c8aa73..77f50a83f8 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -80,6 +80,15 @@ const F32 MAX_AVATAR_LOD_FACTOR = 1.0f; extern U32 gFrameCount; +enum ERezzedStatus : S32 +{ + AV_REZZED_UNKNOWN = -1, + AV_REZZED_CLOUD = 0, + AV_REZZED_GRAY = 1, + AV_REZZED_TEXTURED = 2, // "downloading" + AV_REZZED_FULL = 3 +}; + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // LLVOAvatar // @@ -327,22 +336,24 @@ public: // avatar render cost - U32 getVisualComplexity() { return mVisualComplexity; }; + U32 getVisualComplexity() { return mVisualComplexity; }; // surface area calculation - F32 getAttachmentSurfaceArea() { return mAttachmentSurfaceArea; }; + F32 getAttachmentSurfaceArea() { return mAttachmentSurfaceArea; }; - U32 getReportedVisualComplexity() { return mReportedVisualComplexity; }; // Numbers as reported by the SL server - void setReportedVisualComplexity(U32 value) { mReportedVisualComplexity = value; }; - - S32 getUpdatePeriod() { return mUpdatePeriod; }; - const LLColor4 & getMutedAVColor() { return mMutedAVColor; }; + U32 getReportedVisualComplexity() { return mReportedVisualComplexity; }; // Numbers as reported by the SL server + void setReportedVisualComplexity(U32 value) { mReportedVisualComplexity = value; }; + + S32 getUpdatePeriod() { return mUpdatePeriod; }; + const LLColor4 & getMutedAVColor() { return mMutedAVColor; }; static void updateImpostorRendering(U32 newMaxNonImpostorsValue); void idleUpdateBelowWater(); static void updateNearbyAvatarCount(); + static ERezzedStatus next(ERezzedStatus status) { return (ERezzedStatus)++(S32&)status; } + LLVector3 idleCalcNameTagPosition(const LLVector3 &root_pos_last); //-------------------------------------------------------------------- @@ -397,13 +408,12 @@ public: bool visualParamWeightsAreDefault(); virtual bool getIsCloud() const; BOOL isFullyTextured() const; - BOOL hasGray() const; - S32 getRezzedStatus() const; // 0 = cloud, 1 = gray, 2 = textured, 3 = textured and fully downloaded. - void updateRezzedStatusTimers(S32 status); + BOOL hasGray() const; + ERezzedStatus getRezzedStatus() const; + void updateRezzedStatusTimers(ERezzedStatus status); - S32 mLastRezzedStatus; + ERezzedStatus mLastRezzedStatus; - void startPhase(const std::string& phase_name); void stopPhase(const std::string& phase_name, bool err_check = true); void clearPhases(); @@ -422,7 +432,6 @@ protected: private: BOOL mFirstFullyVisible; - F32 mFirstUseDelaySeconds; LLFrameTimer mFirstAppearanceMessageTimer; BOOL mFullyLoaded; @@ -708,8 +717,7 @@ public: BOOL isFullyBaked(); static BOOL areAllNearbyInstancesBaked(S32& grey_avatars); - static void getNearbyRezzedStats(std::vector<S32>& counts); - static std::string rezStatusToString(S32 status); + static std::string rezStatusToString(ERezzedStatus status); //-------------------------------------------------------------------- // Baked textures @@ -727,7 +735,7 @@ protected: LLViewerTexLayerSet* getTexLayerSet(const U32 index) const { return dynamic_cast<LLViewerTexLayerSet*>(mBakedTextureDatas[index].mTexLayerSet); } - LLLoadedCallbackEntry::source_callback_list_t mCallbackTextureList ; + LLLoadedCallbackEntry::source_callback_list_t mCallbackTextureList; BOOL mLoadedCallbacksPaused; S32 mLoadedCallbackTextures; // count of 'loaded' baked textures, filled from mCallbackTextureList LLFrameTimer mLastTexCallbackAddedTime; diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index f12fc3babc..3cf20fc77c 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -2233,12 +2233,17 @@ void LLVOAvatarSelf::appearanceChangeMetricsCoro(std::string url) // Status of all nearby avs including ourself. msg["nearby"] = LLSD::emptyArray(); - std::vector<S32> rez_counts; - LLVOAvatar::getNearbyRezzedStats(rez_counts); - for (S32 rez_stat = 0; rez_stat < rez_counts.size(); ++rez_stat) + + S32 status_counts[AV_REZZED_FULL - AV_REZZED_CLOUD + 1] = { 0 }; + for (LLCharacter* character : LLCharacter::sInstances) + { + ERezzedStatus status = ((LLVOAvatar*)character)->getRezzedStatus(); + ++status_counts[status - AV_REZZED_CLOUD]; + } + for (ERezzedStatus status = AV_REZZED_CLOUD; status <= AV_REZZED_FULL; ++(S32&)status) { - std::string rez_status_name = LLVOAvatar::rezStatusToString(rez_stat); - msg["nearby"][rez_status_name] = rez_counts[rez_stat]; + std::string status_name = LLVOAvatar::rezStatusToString(status); + msg["nearby"][status_name] = status_counts[status - AV_REZZED_CLOUD]; } // std::vector<std::string> bucket_fields("timer_name","is_self","grid_x","grid_y","is_using_server_bake"); |