summaryrefslogtreecommitdiff
path: root/indra/newview/lllandmarklist.cpp
diff options
context:
space:
mode:
authorDmitry Zaporozhan <dzaporozhan@productengine.com>2009-10-28 16:53:45 +0200
committerDmitry Zaporozhan <dzaporozhan@productengine.com>2009-10-28 16:53:45 +0200
commit726b00fd18107ef9aebf24b6d56ae8dcbb2003a6 (patch)
tree3030989a4c8a2c33991c0b19d001e925306add85 /indra/newview/lllandmarklist.cpp
parent0e4f48950be95430a1a6052cd41790d807c31216 (diff)
parent2663bad36b4b02003b4b4c5989c2571c71504cd7 (diff)
Merge
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/lllandmarklist.cpp')
-rw-r--r--indra/newview/lllandmarklist.cpp36
1 files changed, 25 insertions, 11 deletions
diff --git a/indra/newview/lllandmarklist.cpp b/indra/newview/lllandmarklist.cpp
index 2e8084759a..83e694951b 100644
--- a/indra/newview/lllandmarklist.cpp
+++ b/indra/newview/lllandmarklist.cpp
@@ -37,6 +37,7 @@
#include "message.h"
#include "llassetstorage.h"
+#include "llappviewer.h"
#include "llagent.h"
#include "llnotify.h"
#include "llvfile.h"
@@ -63,20 +64,32 @@ LLLandmark* LLLandmarkList::getAsset(const LLUUID& asset_uuid, loaded_callback_t
}
else
{
- if ( gLandmarkList.mBadList.find(asset_uuid) == gLandmarkList.mBadList.end() )
+ if ( mBadList.find(asset_uuid) != mBadList.end() )
{
- if (cb)
+ return NULL;
+ }
+
+ landmark_requested_list_t::iterator iter = mRequestedList.find(asset_uuid);
+ if (iter != mRequestedList.end())
+ {
+ const F32 rerequest_time = 30.f; // 30 seconds between requests
+ if (gFrameTimeSeconds - iter->second < rerequest_time)
{
- loaded_callback_map_t::value_type vt(asset_uuid, cb);
- mLoadedCallbackMap.insert(vt);
+ return NULL;
}
-
- gAssetStorage->getAssetData(
- asset_uuid,
- LLAssetType::AT_LANDMARK,
- LLLandmarkList::processGetAssetReply,
- NULL);
}
+
+ if (cb)
+ {
+ loaded_callback_map_t::value_type vt(asset_uuid, cb);
+ mLoadedCallbackMap.insert(vt);
+ }
+
+ gAssetStorage->getAssetData(asset_uuid,
+ LLAssetType::AT_LANDMARK,
+ LLLandmarkList::processGetAssetReply,
+ NULL);
+ mRequestedList[asset_uuid] = gFrameTimeSeconds;
}
return NULL;
}
@@ -103,7 +116,8 @@ void LLLandmarkList::processGetAssetReply(
if (landmark)
{
gLandmarkList.mList[ uuid ] = landmark;
-
+ gLandmarkList.mRequestedList.erase(uuid);
+
LLVector3d pos;
if(!landmark->getGlobalPos(pos))
{