Avoid sculpt discard-level 5 spam.

This commit is contained in:
Shyotl
2013-02-12 14:46:31 -06:00
parent dc3f91b121
commit c799f9f7eb

View File

@@ -926,20 +926,32 @@ void LLVOVolume::sculpt()
if (discard_level > max_discard)
discard_level = max_discard; // clamp to the best we can do
S32 current_discard = getVolume()->getSculptLevel();
S32 current_discard = getVolume()->getSculptLevel() ;
if(current_discard < -2)
{
llwarns << "WARNING!!: Current discard of sculpty at " << current_discard
<< " is less than -2." << llendl;
static S32 low_sculpty_discard_warning_count = 100;
if (++low_sculpty_discard_warning_count >= 100)
{ // Log first time, then every 100 afterwards otherwise this can flood the logs
llwarns << "WARNING!!: Current discard for sculpty " << mSculptTexture->getID()
<< " at " << current_discard
<< " is less than -2." << llendl;
low_sculpty_discard_warning_count = 0;
}
// corrupted volume... don't update the sculpty
return;
}
else if (current_discard > MAX_DISCARD_LEVEL)
{
llwarns << "WARNING!!: Current discard of sculpty at " << current_discard
<< " is more than than allowed max of " << MAX_DISCARD_LEVEL << llendl;
static S32 high_sculpty_discard_warning_count = 100;
if (++high_sculpty_discard_warning_count >= 100)
{ // Log first time, then every 100 afterwards otherwise this can flood the logs
llwarns << "WARNING!!: Current discard for sculpty " << mSculptTexture->getID()
<< " at " << current_discard
<< " is more than than allowed max of " << MAX_DISCARD_LEVEL << llendl;
high_sculpty_discard_warning_count = 0;
}
// corrupted volume... don't update the sculpty
return;
}