diff options
-rw-r--r-- | indra/newview/llcallingcard.cpp | 20 | ||||
-rw-r--r-- | indra/newview/llcallingcard.h | 2 | ||||
-rw-r--r-- | indra/newview/llgltfmateriallist.cpp | 16 | ||||
-rw-r--r-- | indra/newview/llgltfmateriallist.h | 2 | ||||
-rw-r--r-- | indra/newview/llpanelface.cpp | 11 | ||||
-rw-r--r-- | indra/newview/llstartup.cpp | 11 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/ja/strings.xml | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/zh/strings.xml | 1 |
8 files changed, 51 insertions, 13 deletions
diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index 8e9ab8f87f..549c7ed0e4 100644 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -271,6 +271,22 @@ S32 LLAvatarTracker::addBuddyList(const LLAvatarTracker::buddy_map_t& buds) << "]" << LL_ENDL; } } + + // It's possible that the buddy list getting propagated from the inventory may have happened after we actually got the buddy list. + // Any buddies that we got prior will reside in a special queue that we must process and update statuses accordingly with. + // Do that here. + // -Geenz 2025-03-12 + while (!mBuddyStatusQueue.empty()) + { + auto buddyStatus = mBuddyStatusQueue.front(); + mBuddyStatusQueue.pop(); + + if (mBuddyInfo.find(buddyStatus.first) != mBuddyInfo.end()) + { + setBuddyOnline(buddyStatus.first, buddyStatus.second); + } + } + // do not notify observers here - list can be large so let it be done on idle. return new_buddy_count; @@ -335,6 +351,8 @@ void LLAvatarTracker::setBuddyOnline(const LLUUID& id, bool is_online) { LL_WARNS() << "!! No buddy info found for " << id << ", setting to " << (is_online ? "Online" : "Offline") << LL_ENDL; + LL_WARNS() << "Did we receive a buddy status update before the buddy info?" << LL_ENDL; + mBuddyStatusQueue.push(std::make_pair(id, is_online)); } } @@ -706,6 +724,8 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online) { LL_WARNS() << "Received online notification for unknown buddy: " << agent_id << " is " << (online ? "ONLINE" : "OFFLINE") << LL_ENDL; + LL_WARNS() << "Adding buddy to buddy queue." << LL_ENDL; + mBuddyStatusQueue.push(std::make_pair(agent_id, true)); } if(tracking_id == agent_id) diff --git a/indra/newview/llcallingcard.h b/indra/newview/llcallingcard.h index 48b93fdf9d..f45adfbfec 100644 --- a/indra/newview/llcallingcard.h +++ b/indra/newview/llcallingcard.h @@ -109,6 +109,7 @@ public: // add or remove agents from buddy list. Each method takes a set // of buddies and returns how many were actually added or removed. typedef std::map<LLUUID, LLRelationship*> buddy_map_t; + typedef std::queue<std::pair<LLUUID, bool>> buddy_status_queue_t; S32 addBuddyList(const buddy_map_t& buddies); //S32 removeBuddyList(const buddy_list_t& exes); @@ -194,6 +195,7 @@ protected: //LLInventoryObserver* mInventoryObserver; buddy_map_t mBuddyInfo; + buddy_status_queue_t mBuddyStatusQueue; typedef std::set<LLUUID> changed_buddy_t; changed_buddy_t mChangedBuddyIDs; diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp index 25438eae5e..d8b3f996aa 100644 --- a/indra/newview/llgltfmateriallist.cpp +++ b/indra/newview/llgltfmateriallist.cpp @@ -353,6 +353,18 @@ void LLGLTFMaterialList::queueApply(const LLViewerObject* obj, S32 side, const L } } +void LLGLTFMaterialList::queueApply(const LLViewerObject* obj, S32 side, const LLUUID& asset_id, const std::string &override_json) +{ + if (asset_id.isNull() || override_json.empty()) + { + queueApply(obj, side, asset_id); + } + else + { + sApplyQueue.push_back({ obj->getID(), side, asset_id, nullptr, override_json }); + } +} + void LLGLTFMaterialList::queueApply(const LLViewerObject* obj, S32 side, const LLUUID& asset_id, const LLGLTFMaterial* material_override) { if (asset_id.isNull() || material_override == nullptr) @@ -456,6 +468,10 @@ void LLGLTFMaterialList::flushUpdatesOnce(std::shared_ptr<CallbackHolder> callba { data[i]["gltf_json"] = e.override_data->asJSON(); } + if (!e.override_json.empty()) + { + data[i]["gltf_json"] = e.override_json; + } else { // Clear all overrides diff --git a/indra/newview/llgltfmateriallist.h b/indra/newview/llgltfmateriallist.h index e79da3592a..97d173d3a7 100644 --- a/indra/newview/llgltfmateriallist.h +++ b/indra/newview/llgltfmateriallist.h @@ -67,6 +67,7 @@ public: // // NOTE: Implicitly clears most override data if present static void queueApply(const LLViewerObject* obj, S32 side, const LLUUID& asset_id); + static void queueApply(const LLViewerObject* obj, S32 side, const LLUUID& asset_id, const std::string& override_json); // Queue an application of a material asset we want to send to the simulator. // Call "flushUpdates" to flush pending updates immediately. @@ -160,6 +161,7 @@ protected: S32 side = -1; LLUUID asset_id; LLPointer<LLGLTFMaterial> override_data; + std::string override_json; }; typedef std::list<ApplyMaterialAssetData> apply_queue_t; diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 692bd9cc41..f491cccaf8 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -4464,21 +4464,14 @@ void LLPanelFace::onPasteTexture(LLViewerObject* objectp, S32 te) tep->setGLTFRenderMaterial(nullptr); tep->setGLTFMaterialOverride(nullptr); - LLSD override_data; - override_data["object_id"] = objectp->getID(); - override_data["side"] = te; if (te_data["te"].has("pbr_override")) { - override_data["gltf_json"] = te_data["te"]["pbr_override"]; + LLGLTFMaterialList::queueApply(objectp, te, te_data["te"]["pbr"].asUUID(), te_data["te"]["pbr_override"]); } else { - override_data["gltf_json"] = ""; + LLGLTFMaterialList::queueApply(objectp, te, te_data["te"]["pbr"].asUUID()); } - - override_data["asset_id"] = te_data["te"]["pbr"].asUUID(); - - LLGLTFMaterialList::queueUpdate(override_data); } else { diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index eb0e9ef4bc..3973036cc6 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1714,6 +1714,15 @@ bool idle_startup() gAssetStorage->setUpstream(regionp->getHost()); gCacheName->setUpstream(regionp->getHost()); } + + // It is entirely possible that we may get the friends list _before_ we have the callbacks registered to process that. + // This will lead to the friends list not being processed properly and online statuses not being updated appropriately at login. + // So, we need to make sure that we have the callbacks registered before we get the friends list. + // This appears to crop up on some systems somewhere between STATE_AGENT_SEND and STATE_INVENTORY_SEND. It's happened to me a few times now. + // -Geenz 2025-03-12 + LL_INFOS() << " AvatarTracker" << LL_ENDL; + LLAvatarTracker::instance().registerCallbacks(gMessageSystem); + do_startup_frame(); // Create login effect @@ -2013,8 +2022,6 @@ bool idle_startup() LLMessageSystem* msg = gMessageSystem; LL_INFOS() << " Inventory" << LL_ENDL; LLInventoryModel::registerCallbacks(msg); - LL_INFOS() << " AvatarTracker" << LL_ENDL; - LLAvatarTracker::instance().registerCallbacks(msg); LL_INFOS() << " Landmark" << LL_ENDL; LLLandmark::registerCallbacks(msg); do_startup_frame(); diff --git a/indra/newview/skins/default/xui/ja/strings.xml b/indra/newview/skins/default/xui/ja/strings.xml index fa6c329fe7..71f7c1a034 100644 --- a/indra/newview/skins/default/xui/ja/strings.xml +++ b/indra/newview/skins/default/xui/ja/strings.xml @@ -66,7 +66,6 @@ SLURL:<nolink>[SLURL]</nolink> 帯域幅:[NET_BANDWITH]kbit/秒 LOD係数:[LOD_FACTOR] 描画の質:[RENDER_QUALITY] -高度な光源モデル:[GPU_SHADERS] テクスチャメモリ:[TEXTURE_MEMORY]㎆ </string> <string name="AboutOSXHiDPI"> diff --git a/indra/newview/skins/default/xui/zh/strings.xml b/indra/newview/skins/default/xui/zh/strings.xml index bdb16c9bf1..d053d2b30d 100644 --- a/indra/newview/skins/default/xui/zh/strings.xml +++ b/indra/newview/skins/default/xui/zh/strings.xml @@ -69,7 +69,6 @@ 頻寬:[NET_BANDWITH]千位元/秒 細節層次率:[LOD_FACTOR] 呈像品質:[RENDER_QUALITY] -進階照明模型:[GPU_SHADERS] 材質記憶體:[TEXTURE_MEMORY]MB </string> <string name="AboutOSXHiDPI"> |