summaryrefslogtreecommitdiff
path: root/indra/newview/llappearancemgr.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2012-06-29 13:08:00 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2012-06-29 13:08:00 -0400
commitfe01e64f9756641756d18d7aab7079bfee21c089 (patch)
treeeb02415c3dceffc9b0d220c689a25d1493fcdb5e /indra/newview/llappearancemgr.cpp
parentd8b89bdb261ddd951b7ddb6354543a7714e3cf01 (diff)
SH-3226 WIP - request appearance update request, connects to UpdateAgentAppearance cap, in updateAppearanceFromCOF()
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rwxr-xr-xindra/newview/llappearancemgr.cpp30
1 files changed, 30 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: