From 00ab8eb6e6f1958a41ec9d6cfbdda0dd85f1dd8a Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 15 Oct 2020 18:34:15 +0100 Subject: SL-14130 - WIP, notes on impostor state management --- indra/newview/llvoavatar.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index f45c3c86a1..cbadf4bcda 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2763,6 +2763,9 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update) BOOL visible = isVisible() || mNeedsAnimUpdate; // update attachments positions + // FIXME what does sUseImpostors do + // here? Shouldn't behavior be based on state of this avatar, + // rather than some piece of global state? if (detailed_update || !sUseImpostors) { LL_RECORD_BLOCK_TIME(FTM_ATTACHMENT_UPDATE); @@ -3995,7 +3998,7 @@ void LLVOAvatar::computeUpdatePeriod() && isVisible() && (!isSelf() || visually_muted) && !isUIAvatar() - && sUseImpostors + && sUseImpostors // FIXME && !mNeedsAnimUpdate && !sFreezeCounter) { @@ -10240,6 +10243,7 @@ void LLVOAvatar::updateImpostors() for (std::vector::iterator iter = instances_copy.begin(); iter != instances_copy.end(); ++iter) { + // FIXME state spaghetti! Can we just use shouldImpostor() here? LLVOAvatar* avatar = (LLVOAvatar*) *iter; if (!avatar->isDead() && avatar->isVisible() @@ -10257,11 +10261,14 @@ void LLVOAvatar::updateImpostors() // virtual BOOL LLVOAvatar::isImpostor() { - return sUseImpostors && (isVisuallyMuted() || (mUpdatePeriod >= IMPOSTOR_PERIOD)) ? TRUE : FALSE; + // FIXME this doesn't seem to actually mean that the avatar is currently shown as an impostor, or should be. + // un-impostored avs have mUpdatePeriod 1. IMPOSTOR_PERIOD is 2. + return sUseImpostors && (isVisuallyMuted() || (mUpdatePeriod >= IMPOSTOR_PERIOD)); } BOOL LLVOAvatar::shouldImpostor(const U32 rank_factor) const { + // FIXME sUseImpostors question return (!isSelf() && sUseImpostors && mVisibilityRank > (sMaxNonImpostors * rank_factor)); } -- cgit v1.3