diff options
| author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2013-03-01 13:50:21 -0500 | 
|---|---|---|
| committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2013-03-01 13:50:21 -0500 | 
| commit | 312b2563548c19837707b6598932d8ef19430f73 (patch) | |
| tree | 3add2d71c36dc36e0660db32b8e1983cdc532c35 | |
| parent | e069e45012a06735f9d7f9bfae755ee995be4423 (diff) | |
Periodic log messages to explain why user is still clouded, if they are
| -rwxr-xr-x | indra/newview/llvoavatarself.cpp | 50 | 
1 files changed, 41 insertions, 9 deletions
| diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index c069488a37..d3c91f3339 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1946,19 +1946,41 @@ void LLVOAvatarSelf::dumpTotalLocalTextureByteCount()  BOOL LLVOAvatarSelf::getIsCloud() const  { +	// Let people know why they're clouded without spamming them into oblivion. +	bool do_warn = false; +	static LLTimer time_since_notice; +	F32 update_freq = 30.0; +	if (time_since_notice.getElapsedTimeF32() > update_freq) +	{ +		time_since_notice.reset(); +		do_warn = true; +	} +	  	// do we have our body parts? -	if (gAgentWearables.getWearableCount(LLWearableType::WT_SHAPE) == 0 || -		gAgentWearables.getWearableCount(LLWearableType::WT_HAIR) == 0 || -		gAgentWearables.getWearableCount(LLWearableType::WT_EYES) == 0 || -		gAgentWearables.getWearableCount(LLWearableType::WT_SKIN) == 0)	 +	S32 shape_count = gAgentWearables.getWearableCount(LLWearableType::WT_SHAPE); +	S32 hair_count = gAgentWearables.getWearableCount(LLWearableType::WT_HAIR); +	S32 eye_count = gAgentWearables.getWearableCount(LLWearableType::WT_EYES); +	S32 skin_count = gAgentWearables.getWearableCount(LLWearableType::WT_SKIN); +	if (!shape_count || !hair_count || !eye_count || !skin_count)  	{ -		lldebugs << "No body parts" << llendl; +		if (do_warn) +		{ +			llinfos << "Self is clouded due to missing one or more required body parts: " +					<< (shape_count ? "" : "SHAPE ") +					<< (hair_count ? "" : "HAIR ") +					<< (eye_count ? "" : "EYES ") +					<< (skin_count ? "" : "SKIN ") +					<< llendl; +		}  		return TRUE;  	}  	if (!isTextureDefined(TEX_HAIR, 0))  	{ -		lldebugs << "No hair texture" << llendl; +		if (do_warn) +		{ +			llinfos << "Self is clouded because of no hair texture" << llendl; +		}  		return TRUE;  	} @@ -1967,14 +1989,20 @@ BOOL LLVOAvatarSelf::getIsCloud() const  		if (!isLocalTextureDataAvailable(getLayerSet(BAKED_LOWER)) &&  			(!isTextureDefined(TEX_LOWER_BAKED, 0)))  		{ -			lldebugs << "Lower textures not baked" << llendl; +			if (do_warn) +			{ +				llinfos << "Self is clouded because lower textures not baked" << llendl; +			}  			return TRUE;  		}  		if (!isLocalTextureDataAvailable(getLayerSet(BAKED_UPPER)) &&  			(!isTextureDefined(TEX_UPPER_BAKED, 0)))  		{ -			lldebugs << "Upper textures not baked" << llendl; +			if (do_warn) +			{ +				llinfos << "Self is clouded because upper textures not baked" << llendl; +			}  			return TRUE;  		} @@ -1991,7 +2019,11 @@ BOOL LLVOAvatarSelf::getIsCloud() const  			const LLViewerTexture* baked_img = getImage( texture_data.mTextureIndex, 0 );  			if (!baked_img || !baked_img->hasGLTexture())  			{ -				lldebugs << "Texture at index " << i << " (texture index is " << texture_data.mTextureIndex << ") is not loaded" << llendl; +				if (do_warn) +				{ +					llinfos << "Self is clouded because texture at index " << i +							<< " (texture index is " << texture_data.mTextureIndex << ") is not loaded" << llendl; +				}  				return TRUE;  			}  		} | 
