meow-7.2.2
Steve Bennetts 2009-10-26 16:03:34 -07:00
commit 7f3af8bc38
4 changed files with 34 additions and 17 deletions

View File

@ -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)
{
loaded_callback_map_t::value_type vt(asset_uuid, cb);
mLoadedCallbackMap.insert(vt);
}
gAssetStorage->getAssetData(
asset_uuid,
LLAssetType::AT_LANDMARK,
LLLandmarkList::processGetAssetReply,
NULL);
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)
{
return 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))
{

View File

@ -74,7 +74,10 @@ protected:
typedef std::set<LLUUID> landmark_bad_list_t;
landmark_bad_list_t mBadList;
typedef std::map<LLUUID,F32> landmark_requested_list_t;
landmark_requested_list_t mRequestedList;
// *TODO: make the callback multimap a template class and make use of it
// here and in LLLandmark.
typedef std::multimap<LLUUID, loaded_callback_t> loaded_callback_map_t;

View File

@ -2836,8 +2836,8 @@
<button
follows="left|top"
height="20"
label="Land profile"
label_selected="Land profile"
label="About Land"
label_selected="About Land"
layout="topleft"
left_delta="0"
name="button about land"

View File

@ -232,7 +232,7 @@
<menu_item_separator
layout="topleft" />
<menu_item_call
label="Place Profile"
label="About Land"
layout="topleft"
name="About Land">
<menu_item_call.on_click