SL-20244 Log crash reason before assertion in check_rigged_group()

meow-7.2.2
Alexander Gavriliuk 2023-09-22 11:10:40 +02:00 committed by Guru
parent dc57c88e7f
commit ac0299fc7c
1 changed files with 11 additions and 3 deletions

View File

@ -1632,6 +1632,8 @@ bool check_rigged_group(LLDrawable* drawable)
if (root->isState(LLDrawable::RIGGED) && root->getSpatialGroup() != group)
{
LL_WARNS() << "[root->isState(LLDrawable::RIGGED) and root->getSpatialGroup() != group] is true"
" (" << root->getSpatialGroup() << " != " << group << ")" << LL_ENDL;
llassert(false);
return false;
}
@ -1641,8 +1643,10 @@ bool check_rigged_group(LLDrawable* drawable)
{
for (auto& face : root->getFaces())
{
if ((S32) face->getDrawOrderIndex() <= last_draw_index)
if ((S32)face->getDrawOrderIndex() <= last_draw_index)
{
LL_WARNS() << "[(S32)face->getDrawOrderIndex() <= last_draw_index] is true"
" (" << (S32)face->getDrawOrderIndex() << " <= " << last_draw_index << ")" << LL_ENDL;
llassert(false);
return false;
}
@ -1656,17 +1660,21 @@ bool check_rigged_group(LLDrawable* drawable)
{
for (auto& face : child->mDrawable->getFaces())
{
if ((S32) face->getDrawOrderIndex() <= last_draw_index)
if ((S32)face->getDrawOrderIndex() <= last_draw_index)
{
LL_WARNS() << "[(S32)face->getDrawOrderIndex() <= last_draw_index] is true"
" (" << (S32)face->getDrawOrderIndex() << " <= " << last_draw_index << ")" << LL_ENDL;
llassert(false);
return false;
}
last_draw_index = face->getDrawOrderIndex();
}
}
if (child->mDrawable->getSpatialGroup() != group)
{
LL_WARNS() << "[child->mDrawable->getSpatialGroup() != group] is true"
" (" << child->mDrawable->getSpatialGroup() << " != " << group << ")" << LL_ENDL;
llassert(false);
return false;
}