summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-08-06 18:41:52 +0300
committerGitHub <noreply@github.com>2025-08-06 18:41:52 +0300
commit55f1c8b9797836c9816528bb5b772eb83b083b50 (patch)
treefdbc5a913c62265f95e610819637e096f0f85339 /indra/newview/llvovolume.cpp
parent514b658fde13bb0c0ec862b081eeebf47bace70d (diff)
parentce9d66cdd18c58c3b26fbebde633ae00732d7f9f (diff)
Merge pull request #4492 Merge Develop into Maint-C (2025.06)
Merge Develop into Maint-C (2025.06)
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 4931473551..80fc486a10 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -2656,6 +2656,17 @@ void LLVOVolume::syncMediaData(S32 texture_index, const LLSD &media_data, bool m
}
viewer_media_t media_impl = LLViewerMedia::getInstance()->updateMediaImpl(mep, previous_url, update_from_self);
+ static LLCachedControl<bool> media_autoplay_huds(gSavedSettings, "MediaAutoPlayHuds", true);
+ bool was_loaded = media_impl->hasMedia();
+ if (isHUDAttachment() && media_autoplay_huds && !was_loaded)
+ {
+ std::string url = mep->getCurrentURL();
+ if (media_impl->getCurrentMediaURL() != url)
+ {
+ media_impl->navigateTo(url, "", false, true);
+ }
+ }
+
addMediaImpl(media_impl, texture_index) ;
}
else
@@ -3799,7 +3810,12 @@ bool LLVOVolume::canBeAnimatedObject() const
bool LLVOVolume::isAnimatedObject() const
{
- LLVOVolume *root_vol = (LLVOVolume*)getRootEdit();
+ LLViewerObject *root_obj = getRootEdit();
+ if (root_obj->getPCode() != LL_PCODE_VOLUME)
+ {
+ return false; // at the moment only volumes can be animated
+ }
+ LLVOVolume* root_vol = (LLVOVolume*)root_obj;
mIsAnimatedObject = root_vol->getExtendedMeshFlags() & LLExtendedMeshParams::ANIMATED_MESH_ENABLED_FLAG;
return mIsAnimatedObject;
}