summaryrefslogtreecommitdiff
path: root/indra/newview/llavatarrenderinfoaccountant.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-09-05 11:00:11 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-09-05 11:00:11 -0400
commit000a23ba0534fdf9bfc4a1b051b7cee0adceef3e (patch)
tree776fe10c7aaf76371a889f79c48c3c9405fd5a4e /indra/newview/llavatarrenderinfoaccountant.cpp
parent7ac4c3b56e5246fceaa73e7c9c665d3c04827d6c (diff)
parentbacf9cfeab90bd1ffad827fa3c34ced985c768a2 (diff)
Merge branch 'develop' into release/luau-scripting
Diffstat (limited to 'indra/newview/llavatarrenderinfoaccountant.cpp')
-rw-r--r--indra/newview/llavatarrenderinfoaccountant.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/indra/newview/llavatarrenderinfoaccountant.cpp b/indra/newview/llavatarrenderinfoaccountant.cpp
index b0befa62e6..44f35981b0 100644
--- a/indra/newview/llavatarrenderinfoaccountant.cpp
+++ b/indra/newview/llavatarrenderinfoaccountant.cpp
@@ -84,7 +84,7 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoGetCoro(std::string url, U64
// Going to request each 15 seconds either way, so don't wait
// too long and don't repeat
httpOpts->setRetries(0);
- httpOpts->setTimeout(SECS_BETWEEN_REGION_REQUEST);
+ httpOpts->setTimeout((unsigned int)SECS_BETWEEN_REGION_REQUEST);
LLSD result = httpAdapter->getAndSuspend(httpRequest, url, httpOpts);
@@ -226,14 +226,12 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoReportCoro(std::string url, U
// Build the render info to POST to the region
LLSD agents = LLSD::emptyMap();
- std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
- while( iter != LLCharacter::sInstances.end() )
+ for (LLCharacter* character : LLCharacter::sInstances)
{
- LLVOAvatar* avatar = dynamic_cast<LLVOAvatar*>(*iter);
- if (avatar &&
- avatar->getRezzedStatus() >= 2 && // Mostly rezzed (maybe without baked textures downloaded)
- !avatar->isDead() && // Not dead yet
+ LLVOAvatar* avatar = (LLVOAvatar*)character;
+ if (!avatar->isDead() && // Not dead yet
!avatar->isControlAvatar() && // Not part of an animated object
+ avatar->getRezzedStatus() >= 2 && // Mostly rezzed (maybe without baked textures downloaded)
avatar->getObjectHost() == regionp->getHost()) // Ensure it's on the same region
{
LLSD info = LLSD::emptyMap();
@@ -243,15 +241,14 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoReportCoro(std::string url, U
// the weight/complexity is unsigned, but LLSD only stores signed integers,
// so if it's over that (which would be ridiculously high), just store the maximum signed int value
info[KEY_WEIGHT] = (S32)(avatar_complexity < S32_MAX ? avatar_complexity : S32_MAX);
- info[KEY_TOO_COMPLEX] = LLSD::Boolean(avatar->isTooComplex());
+ info[KEY_TOO_COMPLEX] = LLSD::Boolean(avatar->isTooComplex());
agents[avatar->getID().asString()] = info;
LL_DEBUGS("AvatarRenderInfo") << "Sending avatar render info for " << avatar->getID()
- << ": " << info << LL_ENDL;
+ << ": " << info << LL_ENDL;
num_avs++;
}
}
- iter++;
}
// Reset this regions timer, moving to longer intervals if there are lots of avatars around