diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2012-06-29 13:08:00 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2012-06-29 13:08:00 -0400 |
commit | fe01e64f9756641756d18d7aab7079bfee21c089 (patch) | |
tree | eb02415c3dceffc9b0d220c689a25d1493fcdb5e /indra/newview | |
parent | d8b89bdb261ddd951b7ddb6354543a7714e3cf01 (diff) |
SH-3226 WIP - request appearance update request, connects to UpdateAgentAppearance cap, in updateAppearanceFromCOF()
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llappearancemgr.cpp | 30 | ||||
-rwxr-xr-x | indra/newview/llappearancemgr.h | 2 | ||||
-rw-r--r-- | indra/newview/llviewerregion.cpp | 1 |
3 files changed, 33 insertions, 0 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 02a90c60ec..d6cb910b4e 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1730,6 +1730,12 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) // the saved outfit stored as a folder link updateIsDirty(); + // Send server request for appearance update + if (useServerTextureBaking()) + { + requestServerAppearanceUpdate(); + } + //dumpCat(getCOF(),"COF, start"); bool follow_folder_links = true; @@ -2589,6 +2595,30 @@ bool LLAppearanceMgr::useServerTextureBaking() return gSavedSettings.getBOOL("UseServerTextureBaking"); } +class RequestAgentUpdateAppearanceResponder: public LLHTTPClient::Responder +{ +public: + RequestAgentUpdateAppearanceResponder() {} + /*virtual*/ void error(U32 status, const std::string& reason) + { + llwarns << "appearance update request failed, reason: " << reason << llendl; + } +}; + +void LLAppearanceMgr::requestServerAppearanceUpdate() +{ + std::string url = gAgent.getRegion()->getCapability("UpdateAgentAppearance"); + if (!url.empty()) + { + LLSD body; + LLHTTPClient::post(url, body, new RequestAgentUpdateAppearanceResponder); + } + else + { + llwarns << "no cap for UpdateAgentAppearance" << llendl; + } +} + class LLShowCreatedOutfit: public LLInventoryCallback { public: diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 4423486b95..46457f1dce 100755 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -184,6 +184,8 @@ public: bool useServerTextureBaking(); + void requestServerAppearanceUpdate(); + protected: LLAppearanceMgr(); ~LLAppearanceMgr(); diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index e3cb985ddb..912dd7d0c9 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1545,6 +1545,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("UntrustedSimulatorMessage"); capabilityNames.append("UpdateAgentInformation"); capabilityNames.append("UpdateAgentLanguage"); + capabilityNames.append("UpdateAgentAppearance"); capabilityNames.append("UpdateGestureAgentInventory"); capabilityNames.append("UpdateNotecardAgentInventory"); capabilityNames.append("UpdateScriptAgent"); |