summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2025-03-29 05:52:26 +0800
committerErik Kundiman <erik@megapahit.org>2025-03-29 05:52:26 +0800
commit1c5777bd52bc581841d832b52572370395f86ff7 (patch)
tree25867742f8be6accd9bc5aaffa0b2acb21ac95b4 /indra/newview/llviewerobject.cpp
parent7bb1791be2a2f41a381736e3f2ca2a5ccde37063 (diff)
parent8eff224c121f8e08514b28326d4c886e4acd35ab (diff)
Merge tag 'Second_Life_Release#8eff224c-2025.03' into 2025.03
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r--indra/newview/llviewerobject.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 3d88cc5f39..c5e81dd179 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -7682,6 +7682,31 @@ void LLViewerObject::setGLTFAsset(const LLUUID& id)
updateVolume(volume_params);
}
+void LLViewerObject::clearTEWaterExclusion(const U8 te)
+{
+ if (permModify())
+ {
+ LLViewerTexture* image = getTEImage(te);
+ if (image && (IMG_ALPHA_GRAD == image->getID()))
+ {
+ // reset texture to default plywood
+ setTEImage(te, LLViewerTextureManager::getFetchedTexture(DEFAULT_OBJECT_TEXTURE, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE));
+
+ // reset texture repeats, that might be altered by invisiprim script from wiki
+ U32 s_axis, t_axis;
+ if (!LLPrimitive::getTESTAxes(te, &s_axis, &t_axis))
+ {
+ return;
+ }
+ F32 DEFAULT_REPEATS = 2.f;
+ F32 new_s = getScale().mV[s_axis] * DEFAULT_REPEATS;
+ F32 new_t = getScale().mV[t_axis] * DEFAULT_REPEATS;
+
+ setTEScale(te, new_s, new_t);
+ sendTEUpdate();
+ }
+ }
+}
class ObjectPhysicsProperties : public LLHTTPNode
{