aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorAidan Thornton2011-03-13 20:51:10 +0000
committerJacek Antonelli2011-05-27 21:09:07 -0500
commitaa3b8631d31cda97aa2ba8e0828b9f8cfc80fd2b (patch)
tree5dcfcbe22a06efb6a5a9f9f051e771b27657641f /linden/indra/newview/llvoavatar.cpp
parentDon't show [CHANNEL] on the login panel, it's not used anymore. (diff)
downloadmeta-impy-aa3b8631d31cda97aa2ba8e0828b9f8cfc80fd2b.zip
meta-impy-aa3b8631d31cda97aa2ba8e0828b9f8cfc80fd2b.tar.gz
meta-impy-aa3b8631d31cda97aa2ba8e0828b9f8cfc80fd2b.tar.bz2
meta-impy-aa3b8631d31cda97aa2ba8e0828b9f8cfc80fd2b.tar.xz
Auto-deRuth code, by way of Siana Gearz and the Phoenix viewer.
[ From Tonya Souther's 672:143c811ee5e2 and 688:1900969ebf65 in phoenix-sg ] (cherry picked from commit d3ffe737a82e4bf54ce1413efeb7e92f43dfccca)
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llvoavatar.cpp53
1 files changed, 52 insertions, 1 deletions
diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp
index b044309..11f4857 100644
--- a/linden/indra/newview/llvoavatar.cpp
+++ b/linden/indra/newview/llvoavatar.cpp
@@ -67,8 +67,9 @@
67#include "lltexlayer.h" 67#include "lltexlayer.h"
68#include "lltoolgrab.h" // for needsRenderBeam 68#include "lltoolgrab.h" // for needsRenderBeam
69#include "lltoolmgr.h" // for needsRenderBeam 69#include "lltoolmgr.h" // for needsRenderBeam
70#include "lltoolmorph.h" 70#include "lltoolmorph.h" // for auto de-ruth
71#include "llviewercamera.h" 71#include "llviewercamera.h"
72#include "llviewergenericmessage.h"
72#include "llviewerimagelist.h" 73#include "llviewerimagelist.h"
73#include "llviewermedia.h" 74#include "llviewermedia.h"
74#include "llviewermenu.h" 75#include "llviewermenu.h"
@@ -870,6 +871,8 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
870 mOohMorph = NULL; 871 mOohMorph = NULL;
871 mAahMorph = NULL; 872 mAahMorph = NULL;
872 873
874 mRuthTimer.reset();
875
873 //------------------------------------------------------------------------- 876 //-------------------------------------------------------------------------
874 // initialize joint, mesh and shape members 877 // initialize joint, mesh and shape members
875 //------------------------------------------------------------------------- 878 //-------------------------------------------------------------------------
@@ -7458,6 +7461,8 @@ BOOL LLVOAvatar::updateIsFullyLoaded()
7458 loading = TRUE; 7461 loading = TRUE;
7459 } 7462 }
7460 7463
7464 updateRuthTimer(loading);
7465
7461 // special case to keep nudity off orientation island - 7466 // special case to keep nudity off orientation island -
7462 // this is fragilely dependent on the compositing system, 7467 // this is fragilely dependent on the compositing system,
7463 // which gets available textures in the following order: 7468 // which gets available textures in the following order:
@@ -7510,6 +7515,35 @@ BOOL LLVOAvatar::updateIsFullyLoaded()
7510 return changed; 7515 return changed;
7511} 7516}
7512 7517
7518void LLVOAvatar::updateRuthTimer(bool loading)
7519{
7520 if (isSelf() || !loading)
7521 {
7522 return;
7523 }
7524
7525 if (mPreviousFullyLoaded)
7526 {
7527 mRuthTimer.reset();
7528 }
7529
7530 const F32 LOADING_TIMEOUT__SECONDS = 90.f;
7531 if (mRuthTimer.getElapsedTimeF32() > LOADING_TIMEOUT__SECONDS)
7532 {
7533 llinfos << "Ruth Timer timeout: Missing texture data for '" << getFullname() << "' "
7534 << "( Params loaded : " << !visualParamWeightsAreDefault() << " ) "
7535 << "( Lower : " << isTextureDefined(TEX_LOWER_BAKED) << " ) "
7536 << "( Upper : " << isTextureDefined(TEX_UPPER_BAKED) << " ) "
7537 << "( Head : " << isTextureDefined(TEX_HEAD_BAKED) << " )."
7538 << llendl;
7539
7540 //LLAvatarPropertiesProcessor::getInstance()->sendAvatarTexturesRequest(getID());
7541 std::vector<std::string> strings;
7542 strings.push_back(getID().asString());
7543 send_generic_message("avatartexturesrequest", strings);
7544 mRuthTimer.reset();
7545 }
7546}
7513 7547
7514BOOL LLVOAvatar::isFullyLoaded() 7548BOOL LLVOAvatar::isFullyLoaded()
7515{ 7549{
@@ -8818,6 +8852,23 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
8818 else 8852 else
8819 { 8853 {
8820 llwarns << "AvatarAppearance msg received without any parameters, object: " << getID() << llendl; 8854 llwarns << "AvatarAppearance msg received without any parameters, object: " << getID() << llendl;
8855 const F32 LOADING_TIMEOUT_SECONDS = 60.f;
8856 // this isn't really a problem if we already have a non-default shape
8857 if (visualParamWeightsAreDefault() && mRuthTimer.getElapsedTimeF32() > LOADING_TIMEOUT_SECONDS)
8858 {
8859 // re-request appearance, hoping that it comes back with a shape next time
8860 llinfos << "Re-requesting AvatarAppearance for object: " << getID() << llendl;
8861 //LLAvatarPropertiesProcessor::getInstance()->sendAvatarTexturesRequest(getID());
8862 std::vector<std::string> strings;
8863 strings.push_back(getID().asString());
8864 send_generic_message("avatartexturesrequest", strings);
8865 mRuthTimer.reset();
8866 }
8867 else
8868 {
8869 llinfos << "That's okay, we already have a non-default shape for object: " << getID() << llendl;
8870 // we don't really care.
8871 }
8821 } 8872 }
8822 8873
8823 setCompositeUpdatesEnabled( TRUE ); 8874 setCompositeUpdatesEnabled( TRUE );