summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobjectlist.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-05-13 14:54:56 -0500
committerDave Parks <davep@lindenlab.com>2010-05-13 14:54:56 -0500
commitd334a9e645ab14c2822f35ee67d2c1e0f2a646a6 (patch)
treea38a1d5147f55380f1e0fb110e2680ab8e9975a6 /indra/newview/llviewerobjectlist.cpp
parent65acaab16ffaa4cc6bed0934973ead659df20741 (diff)
Vis that works and first pass at fetching prim cost.
Diffstat (limited to 'indra/newview/llviewerobjectlist.cpp')
-rw-r--r--indra/newview/llviewerobjectlist.cpp47
1 files changed, 46 insertions, 1 deletions
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 7ba28fef32..047241fffb 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -656,6 +656,14 @@ void LLViewerObjectList::updateApparentAngles(LLAgent &agent)
LLVOAvatar::cullAvatarsByPixelArea();
}
+class LLObjectCostResponder : public LLCurl::Responder
+{
+public:
+ void result(const LLSD& content)
+ {
+ llinfos << content << llendl;
+ }
+};
void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
{
@@ -753,6 +761,40 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
}
}
+ //issue http request for stale object physics costs
+ if (!mStaleObjectCost.empty())
+ {
+ LLViewerRegion* regionp = gAgent.getRegion();
+
+ if (regionp)
+ {
+ std::string url; // = regionp->getCapability("GetObjectCost");
+
+ if (!url.empty())
+ {
+ LLSD id_list;
+ U32 idx = 0;
+ for (std::set<LLUUID>::iterator iter = mStaleObjectCost.begin(); iter != mStaleObjectCost.end(); ++iter)
+ {
+ if (mPendingObjectCost.find(*iter) == mPendingObjectCost.end())
+ {
+ mPendingObjectCost.insert(*iter);
+ id_list[idx++] = *iter;
+ }
+ }
+ mPendingObjectCost = mStaleObjectCost;
+ mStaleObjectCost.clear();
+
+ LLHTTPClient::post(url, id_list, new LLObjectCostResponder());
+ }
+ else
+ {
+ mStaleObjectCost.clear();
+ mPendingObjectCost.clear();
+ }
+ }
+ }
+
mNumSizeCulled = 0;
mNumVisCulled = 0;
@@ -1041,7 +1083,10 @@ void LLViewerObjectList::updateActive(LLViewerObject *objectp)
}
}
-
+void LLViewerObjectList::updateObjectCost(LLViewerObject* object)
+{
+ mStaleObjectCost.insert(object->getID());
+}
void LLViewerObjectList::shiftObjects(const LLVector3 &offset)
{