From 399d93cc367914f80162bb311885aa19263e2adc Mon Sep 17 00:00:00 2001 From: Shyotl Date: Sat, 30 Jun 2012 20:06:48 -0500 Subject: [PATCH] Compiler fixes and a crashfix. --- indra/newview/llinventorybridge.cpp | 8 +++++--- indra/newview/llpaneleditwearable.cpp | 2 +- indra/newview/llpaneleditwearable.h | 3 +-- indra/newview/llvoavatar.cpp | 17 +++++++++++------ indra/newview/pipeline.cpp | 3 ++- 5 files changed, 20 insertions(+), 13 deletions(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 126f38464..8fcbb600e 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -5583,7 +5583,7 @@ LLUIImagePtr LLWearableBridge::getIcon() const return LLInventoryIcon::getIcon(mAssetType, mInvType, mWearableType, FALSE); } -//LLAppearanceMgr::moveWearable unfortunately fails for non-link item, so links in CoF must be found for this to work. +//LLAppearanceMgr::moveWearable unfortunately fails for non-link items, so links in CoF must be found for this to work. void move_wearable_item(LLViewerInventoryItem* item, bool closer_to_body) { if(!item) @@ -5597,11 +5597,13 @@ void move_wearable_item(LLViewerInventoryItem* item, bool closer_to_body) else { LLInventoryModel::item_array_t items; + LLInventoryModel::cat_array_t cats; + LLLinkedItemIDMatches is_linked_item_match(item->getUUID()); gInventory.collectDescendentsIf(LLAppearanceMgr::instance().getCOF(), - LLInventoryModel::cat_array_t(), + cats, items, LLInventoryModel::EXCLUDE_TRASH, - LLLinkedItemIDMatches(item->getUUID())); + is_linked_item_match); if(!items.empty()) { if(LLAppearanceMgr::instance().moveWearable(gInventory.getItem(items.front()->getUUID()),closer_to_body)) diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 953d4c243..bfa43822c 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -975,7 +975,7 @@ void LLPanelEditWearable::setWearableIndex(S32 index) } - const LLEditWearableDictionary::SubpartEntry *subpart_entry = LLEditWearableDictionary::getInstance()->getSubpart(mCurrentSubpart); + const LLEditWearableDictionary::SubpartEntry *subpart_entry = LLEditWearableDictionary::getInstance()->getSubpart((ESubpart)mCurrentSubpart); if(subpart_entry) { value_map_t sorted_params; diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h index 412e6227b..d1877ecaf 100644 --- a/indra/newview/llpaneleditwearable.h +++ b/indra/newview/llpaneleditwearable.h @@ -47,7 +47,6 @@ class LLLineEditor; class LLSubpart; class LLWearableSaveAsDialog; -enum ESubpart; using namespace LLVOAvatarDefines; class LLPanelEditWearable : public LLPanel @@ -128,7 +127,7 @@ private: typedef std::map s32_uuid_map_t; s32_uuid_map_t mPreviousAlphaTexture; - ESubpart mCurrentSubpart; + U32 mCurrentSubpart; U32 mCurrentIndex; LLWearable* mCurrentWearable; LLWearable* mPendingWearable; //For SaveAs. There's a period where the old wearable will be removed, but the new one will still be pending, diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 44c184cbd..c639fb330 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -618,6 +618,10 @@ SHClientTagMgr::SHClientTagMgr() gSavedSettings.getControl("AscentFriendColor")->getSignal()->connect(boost::bind(&LLVOAvatar::invalidateNameTags)); gSavedSettings.getControl("AscentMutedColor")->getSignal()->connect(boost::bind(&LLVOAvatar::invalidateNameTags)); + gSavedSettings.getControl("AscentUseCustomTag")->getSignal()->connect(boost::bind(&SHClientTagMgr::updateAgentAvatarTag, this)); + gSavedSettings.getControl("AscentCustomTagColor")->getSignal()->connect(boost::bind(&SHClientTagMgr::updateAgentAvatarTag, this)); + gSavedSettings.getControl("AscentCustomTagLabel")->getSignal()->connect(boost::bind(&SHClientTagMgr::updateAgentAvatarTag, this)); + if(!getIsEnabled()) return; @@ -627,9 +631,6 @@ SHClientTagMgr::SHClientTagMgr() //These only matter to the agent avatar. Don't iterate over everything. gSavedSettings.getControl("AscentUseTag")->getSignal()->connect(boost::bind(&SHClientTagMgr::updateAgentAvatarTag, this)); - gSavedSettings.getControl("AscentUseCustomTag")->getSignal()->connect(boost::bind(&SHClientTagMgr::updateAgentAvatarTag, this)); - gSavedSettings.getControl("AscentCustomTagColor")->getSignal()->connect(boost::bind(&SHClientTagMgr::updateAgentAvatarTag, this)); - gSavedSettings.getControl("AscentCustomTagLabel")->getSignal()->connect(boost::bind(&SHClientTagMgr::updateAgentAvatarTag, this)); gSavedSettings.getControl("AscentReportClientUUID")->getSignal()->connect(boost::bind(&SHClientTagMgr::updateAgentAvatarTag, this)); //Fire off a AgentSetAppearance update if these change. @@ -727,9 +728,6 @@ void SHClientTagMgr::updateAgentAvatarTag() } const LLSD SHClientTagMgr::generateClientTag(const LLVOAvatar* pAvatar) const { - if(!getIsEnabled()) - return LLSD(); - static const LLCachedControl avatar_name_color(gColors,"AvatarNameColor",LLColor4(LLColor4U(251, 175, 93, 255)) ); LLUUID id; @@ -748,6 +746,10 @@ const LLSD SHClientTagMgr::generateClientTag(const LLVOAvatar* pAvatar) const info.insert("color", ascent_custom_tag_color.get().getValue()); return info; } + else if(!getIsEnabled()) + { + return LLSD(); + } else if (ascent_use_tag) { id.set(ascent_report_client_uuid,false); @@ -755,6 +757,9 @@ const LLSD SHClientTagMgr::generateClientTag(const LLVOAvatar* pAvatar) const } else { + if(!getIsEnabled()) + return LLSD(); + LLTextureEntry* pTextureEntry = pAvatar->getTE(TEX_HEAD_BODYPAINT); if (!pTextureEntry) return LLSD(); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 4eb8de2e3..babbedc5a 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -466,7 +466,8 @@ void LLPipeline::init() gSavedSettings.getControl("RenderUseFarClip")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); gSavedSettings.getControl("RenderAvatarMaxVisible")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); //gSavedSettings.getControl("RenderDelayVBUpdate")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - + gSavedSettings.getControl("UseOcclusion")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); + gSavedSettings.getControl("VertexShaderEnable")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); } LLPipeline::~LLPipeline()