diff options
author | cosmic-linden <111533034+cosmic-linden@users.noreply.github.com> | 2023-02-14 14:45:53 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-14 14:45:53 -0800 |
commit | 0dd4efea93ad96da3aab9030e3bfc78c36b2bb10 (patch) | |
tree | 26c5014e88f87a061cafb3d1a8e5fc340e29adee /indra/newview/llpanelface.cpp | |
parent | ba7a3339697a906119520e23064dac2d7a5f31ff (diff) | |
parent | 917932549fe40f02bf393f22ec1af12aa2245264 (diff) |
Merge pull request #85 from secondlife/SL-19002
SL-19002: Handle edge case in client networking which could cause material ID and overrides to become out-of-sync
Diffstat (limited to 'indra/newview/llpanelface.cpp')
-rw-r--r-- | indra/newview/llpanelface.cpp | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index ce086f2520..cb7bc7b5df 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -3825,34 +3825,12 @@ private: struct LLPanelFaceUpdateFunctor : public LLSelectedObjectFunctor { - LLPanelFaceUpdateFunctor(bool update_media, bool update_pbr) + LLPanelFaceUpdateFunctor(bool update_media) : mUpdateMedia(update_media) - , mUpdatePbr(update_pbr) {} virtual bool apply(LLViewerObject* object) { - if (mUpdatePbr) - { - // setRenderMaterialId is supposed to create it - LLRenderMaterialParams* param_block = (LLRenderMaterialParams*)object->getParameterEntry(LLNetworkData::PARAMS_RENDER_MATERIAL); - if (param_block) - { - if (param_block->isEmpty()) - { - object->setHasRenderMaterialParams(false); - } - else if (object->hasRenderMaterialParams()) - { - object->parameterChanged(LLNetworkData::PARAMS_RENDER_MATERIAL, true); - } - else - { - object->setHasRenderMaterialParams(true); - } - } - } - object->sendTEUpdate(); if (mUpdateMedia) @@ -3867,7 +3845,6 @@ struct LLPanelFaceUpdateFunctor : public LLSelectedObjectFunctor } private: bool mUpdateMedia; - bool mUpdatePbr; }; struct LLPanelFaceNavigateHomeFunctor : public LLSelectedTEFunctor @@ -4003,7 +3980,7 @@ void LLPanelFace::onPasteColor() LLPanelFacePasteTexFunctor paste_func(this, PASTE_COLOR); selected_objects->applyToTEs(&paste_func); - LLPanelFaceUpdateFunctor sendfunc(false, false); + LLPanelFaceUpdateFunctor sendfunc(false); selected_objects->applyToObjects(&sendfunc); } @@ -4364,7 +4341,7 @@ void LLPanelFace::onPasteTexture() LLPanelFacePasteTexFunctor paste_func(this, PASTE_TEXTURE); selected_objects->applyToTEs(&paste_func); - LLPanelFaceUpdateFunctor sendfunc(true, true); + LLPanelFaceUpdateFunctor sendfunc(true); selected_objects->applyToObjects(&sendfunc); LLGLTFMaterialList::flushUpdates(); |