diff options
author | Graham Madarasz <graham@lindenlab.com> | 2013-04-30 13:44:35 -0700 |
---|---|---|
committer | Graham Madarasz <graham@lindenlab.com> | 2013-04-30 13:44:35 -0700 |
commit | d659b29f6ca180cac774e4576bba9da791510633 (patch) | |
tree | 9401619efb7e155d1791fa64df8cb9fdfb7efa6b /indra/newview/llviewerobject.cpp | |
parent | 2aa3c592b02bf634a9faee95dc355a9e9166f2b1 (diff) |
Fix vwr-dev-mat merge bugs in llpanelface (missing Oz fix) and XML
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rwxr-xr-x | indra/newview/llviewerobject.cpp | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 8dc13fd0ae..7543e8fabd 100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -4086,47 +4086,50 @@ S32 LLViewerObject::setTETextureCore(const U8 te, LLViewerTexture *image) S32 LLViewerObject::setTENormalMapCore(const U8 te, LLViewerTexture *image) { - S32 retval = 0; + llassert(image); + S32 retval = TEM_CHANGE_TEXTURE; const LLUUID& uuid = image->getID(); - if (uuid != getTE(te)->getMaterialParams()->getNormalID()) + if (uuid != getTE(te)->getID() || + uuid == LLUUID::null) { - retval = TEM_CHANGE_TEXTURE; LLTextureEntry* tep = getTE(te); - LLMaterial* mat = tep->getMaterialParams(); + LLMaterial* mat = tep ? tep->getMaterialParams() : NULL; if (mat) { mat->setNormalID(uuid); } - mTENormalMaps[te] = image; + setChanged(TEXTURE); if (mDrawable.notNull()) { gPipeline.markTextured(mDrawable); } } + mTENormalMaps[te] = image; return retval; } S32 LLViewerObject::setTESpecularMapCore(const U8 te, LLViewerTexture *image) { - S32 retval = 0; + llassert(image); + S32 retval = TEM_CHANGE_TEXTURE; const LLUUID& uuid = image->getID(); - if (uuid != getTE(te)->getMaterialParams()->getSpecularID()) + if (uuid != getTE(te)->getID() || + uuid == LLUUID::null) { - retval = TEM_CHANGE_TEXTURE; LLTextureEntry* tep = getTE(te); - LLMaterial* mat = tep->getMaterialParams(); + LLMaterial* mat = tep ? tep->getMaterialParams() : NULL; if (mat) { mat->setSpecularID(uuid); - } - mTESpecularMaps[te] = image; + } setChanged(TEXTURE); if (mDrawable.notNull()) { gPipeline.markTextured(mDrawable); } } + mTESpecularMaps[te] = image; return retval; } |