aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorDavid Seikel2011-06-04 00:17:28 +1000
committerDavid Seikel2011-06-04 00:17:28 +1000
commit492eaaf4eec82327116f2605e3d8becf94bec1b3 (patch)
treedcddd674cb4861445c3ec5aaa59325b99a437614 /linden/indra/newview/llvoavatar.cpp
parentSet the real bare minimum prim size to 0.00001, as 0 sized objects cause bugs. (diff)
parentFixing the menu to actually use its color options reveals how broken the whol... (diff)
downloadmeta-impy-492eaaf4eec82327116f2605e3d8becf94bec1b3.zip
meta-impy-492eaaf4eec82327116f2605e3d8becf94bec1b3.tar.gz
meta-impy-492eaaf4eec82327116f2605e3d8becf94bec1b3.tar.bz2
meta-impy-492eaaf4eec82327116f2605e3d8becf94bec1b3.tar.xz
Merge branch 'next' of git://github.com/jacek/imprudence into next
Conflicts (manually merged): linden/indra/llcommon/llversionviewer.h linden/indra/llvfs/lldir.cpp linden/indra/llvfs/lldir_mac.cpp linden/indra/newview/CMakeLists.txt linden/indra/newview/English.lproj/InfoPlist.strings linden/indra/newview/Info-Imprudence.plist linden/indra/newview/Info-meta-impy.plist linden/indra/newview/llappviewer.cpp linden/indra/newview/llpanellogin.cpp linden/indra/newview/packaging/mac/Info.plist.in linden/indra/newview/res/viewerRes.rc linden/indra/newview/skins/default/xui/en-us/floater_about.xml linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml linden/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml linden/indra/newview/skins/default/xui/en-us/panel_preferences_im.xml linden/indra/newview/skins/default/xui/en-us/panel_preferences_skins.xml linden/indra/newview/skins/default/xui/en-us/panel_preferences_web.xml linden/indra/newview/skins/default/xui/zh/menu_viewer.xml linden/indra/newview/skins/default/xui/zh/panel_group_general.xml linden/indra/newview/viewer_manifest.py linden/indra/newview/viewerversion.cpp linden/indra/newview/viewerversion.h linden/install.xml Also some post merge tweaks.
Diffstat (limited to 'linden/indra/newview/llvoavatar.cpp')
-rw-r--r--linden/indra/newview/llvoavatar.cpp64
1 files changed, 57 insertions, 7 deletions
diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp
index c268580..5c537a8 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 //-------------------------------------------------------------------------
@@ -1525,7 +1528,7 @@ void LLVOAvatar::loadCloud(const std::string& filename, LLPartSysData& particle
1525 if(particles.mPartImageID.isNull() || default_id == particles.mPartImageID) 1528 if(particles.mPartImageID.isNull() || default_id == particles.mPartImageID)
1526 { 1529 {
1527 LLViewerImage* cloud_image = 1530 LLViewerImage* cloud_image =
1528 gImageList.getImageFromFile("cloud-particle.j2c", MIPMAP_YES, IMMEDIATE_YES, 0, 0, default_id); 1531 gImageList.getImage(default_id);
1529 particles.mPartImageID = cloud_image->getID(); 1532 particles.mPartImageID = cloud_image->getID();
1530 } 1533 }
1531} 1534}
@@ -7461,6 +7464,8 @@ BOOL LLVOAvatar::updateIsFullyLoaded()
7461 loading = TRUE; 7464 loading = TRUE;
7462 } 7465 }
7463 7466
7467 updateRuthTimer(loading);
7468
7464 // special case to keep nudity off orientation island - 7469 // special case to keep nudity off orientation island -
7465 // this is fragilely dependent on the compositing system, 7470 // this is fragilely dependent on the compositing system,
7466 // which gets available textures in the following order: 7471 // which gets available textures in the following order:
@@ -7513,6 +7518,35 @@ BOOL LLVOAvatar::updateIsFullyLoaded()
7513 return changed; 7518 return changed;
7514} 7519}
7515 7520
7521void LLVOAvatar::updateRuthTimer(bool loading)
7522{
7523 if (isSelf() || !loading)
7524 {
7525 return;
7526 }
7527
7528 if (mPreviousFullyLoaded)
7529 {
7530 mRuthTimer.reset();
7531 }
7532
7533 const F32 LOADING_TIMEOUT__SECONDS = 90.f;
7534 if (mRuthTimer.getElapsedTimeF32() > LOADING_TIMEOUT__SECONDS)
7535 {
7536 llinfos << "Ruth Timer timeout: Missing texture data for '" << getFullname() << "' "
7537 << "( Params loaded : " << !visualParamWeightsAreDefault() << " ) "
7538 << "( Lower : " << isTextureDefined(TEX_LOWER_BAKED) << " ) "
7539 << "( Upper : " << isTextureDefined(TEX_UPPER_BAKED) << " ) "
7540 << "( Head : " << isTextureDefined(TEX_HEAD_BAKED) << " )."
7541 << llendl;
7542
7543 //LLAvatarPropertiesProcessor::getInstance()->sendAvatarTexturesRequest(getID());
7544 std::vector<std::string> strings;
7545 strings.push_back(getID().asString());
7546 send_generic_message("avatartexturesrequest", strings);
7547 mRuthTimer.reset();
7548 }
7549}
7516 7550
7517BOOL LLVOAvatar::isFullyLoaded() 7551BOOL LLVOAvatar::isFullyLoaded()
7518{ 7552{
@@ -7603,7 +7637,8 @@ LLGLuint LLVOAvatar::getScratchTexName( LLGLenum format, U32* texture_bytes )
7603 { 7637 {
7604 case GL_LUMINANCE: components = 1; internal_format = GL_LUMINANCE8; break; 7638 case GL_LUMINANCE: components = 1; internal_format = GL_LUMINANCE8; break;
7605 case GL_ALPHA: components = 1; internal_format = GL_ALPHA8; break; 7639 case GL_ALPHA: components = 1; internal_format = GL_ALPHA8; break;
7606 case GL_COLOR_INDEX: components = 1; internal_format = GL_COLOR_INDEX8_EXT; break; 7640// Deprecated. See http://svn.secondlife.com/trac/linden/changeset/2757
7641// case GL_COLOR_INDEX: components = 1; internal_format = GL_COLOR_INDEX8_EXT; break;
7607 case GL_LUMINANCE_ALPHA: components = 2; internal_format = GL_LUMINANCE8_ALPHA8; break; 7642 case GL_LUMINANCE_ALPHA: components = 2; internal_format = GL_LUMINANCE8_ALPHA8; break;
7608 case GL_RGB: components = 3; internal_format = GL_RGB8; break; 7643 case GL_RGB: components = 3; internal_format = GL_RGB8; break;
7609 case GL_RGBA: components = 4; internal_format = GL_RGBA8; break; 7644 case GL_RGBA: components = 4; internal_format = GL_RGBA8; break;
@@ -8756,7 +8791,6 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
8756 8791
8757 if( !param ) 8792 if( !param )
8758 { 8793 {
8759 llwarns << "Number of params in AvatarAppearance msg does not match number of params in avatar xml file." << llendl;
8760 break; 8794 break;
8761 } 8795 }
8762 8796
@@ -8798,10 +8832,9 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
8798 } 8832 }
8799 } 8833 }
8800 8834
8801 S32 expected_tweakable_count = getVisualParamCountInGroup(VISUAL_PARAM_GROUP_TWEAKABLE); // don't worry about VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT 8835 while( param && (param->getGroup() != VISUAL_PARAM_GROUP_TWEAKABLE) )
8802 if (num_blocks != expected_tweakable_count)
8803 { 8836 {
8804 llinfos << "Number of params in AvatarAppearance msg (" << num_blocks << ") does not match number of tweakable params in avatar xml file (" << expected_tweakable_count << "). Processing what we can. Object: " << getID() << llendl; 8837 param = getNextVisualParam();
8805 } 8838 }
8806 8839
8807 if (params_changed) 8840 if (params_changed)
@@ -8822,6 +8855,23 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
8822 else 8855 else
8823 { 8856 {
8824 llwarns << "AvatarAppearance msg received without any parameters, object: " << getID() << llendl; 8857 llwarns << "AvatarAppearance msg received without any parameters, object: " << getID() << llendl;
8858 const F32 LOADING_TIMEOUT_SECONDS = 60.f;
8859 // this isn't really a problem if we already have a non-default shape
8860 if (visualParamWeightsAreDefault() && mRuthTimer.getElapsedTimeF32() > LOADING_TIMEOUT_SECONDS)
8861 {
8862 // re-request appearance, hoping that it comes back with a shape next time
8863 llinfos << "Re-requesting AvatarAppearance for object: " << getID() << llendl;
8864 //LLAvatarPropertiesProcessor::getInstance()->sendAvatarTexturesRequest(getID());
8865 std::vector<std::string> strings;
8866 strings.push_back(getID().asString());
8867 send_generic_message("avatartexturesrequest", strings);
8868 mRuthTimer.reset();
8869 }
8870 else
8871 {
8872 llinfos << "That's okay, we already have a non-default shape for object: " << getID() << llendl;
8873 // we don't really care.
8874 }
8825 } 8875 }
8826 8876
8827 setCompositeUpdatesEnabled( TRUE ); 8877 setCompositeUpdatesEnabled( TRUE );