parent
1b900651f1
commit
be7f6b8575
|
|
@ -162,6 +162,16 @@ void LLLandmarkList::processGetAssetReply(
|
|||
gLandmarkList.makeCallbacks(uuid);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// failed to parse, shouldn't happen
|
||||
gLandmarkList.eraseCallbacks(uuid);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// got a good status, but no file, shouldn't happen
|
||||
gLandmarkList.eraseCallbacks(uuid);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -180,7 +190,7 @@ void LLLandmarkList::processGetAssetReply(
|
|||
|
||||
gLandmarkList.mBadList.insert(uuid);
|
||||
gLandmarkList.mRequestedList.erase(uuid); //mBadList effectively blocks any load, so no point keeping id in requests
|
||||
// todo: this should clean mLoadedCallbackMap!
|
||||
gLandmarkList.eraseCallbacks(uuid);
|
||||
}
|
||||
|
||||
// getAssetData can fire callback immediately, causing
|
||||
|
|
@ -220,19 +230,32 @@ BOOL LLLandmarkList::assetExists(const LLUUID& asset_uuid)
|
|||
void LLLandmarkList::onRegionHandle(const LLUUID& landmark_id)
|
||||
{
|
||||
LLLandmark* landmark = getAsset(landmark_id);
|
||||
if (!landmark)
|
||||
{
|
||||
LL_WARNS() << "Got region handle but the landmark " << landmark_id << " not found." << LL_ENDL;
|
||||
eraseCallbacks(landmark_id);
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate landmark global position.
|
||||
// This should succeed since the region handle is available.
|
||||
LLVector3d pos;
|
||||
if (landmark && !landmark->getGlobalPos(pos))
|
||||
if (!landmark->getGlobalPos(pos))
|
||||
{
|
||||
LL_WARNS() << "Got region handle but the landmark " << landmark_id << " global position is still unknown." << LL_ENDL;
|
||||
LL_WARNS() << "Got region handle but the landmark " << landmark_id << " global position is still unknown." << LL_ENDL;
|
||||
eraseCallbacks(landmark_id);
|
||||
return;
|
||||
}
|
||||
|
||||
// Call this even if no landmark exists to clean mLoadedCallbackMap
|
||||
makeCallbacks(landmark_id);
|
||||
}
|
||||
|
||||
void LLLandmarkList::eraseCallbacks(const LLUUID& landmark_id)
|
||||
{
|
||||
mLoadedCallbackMap.erase(landmark_id);
|
||||
}
|
||||
|
||||
void LLLandmarkList::makeCallbacks(const LLUUID& landmark_id)
|
||||
{
|
||||
LLLandmark* landmark = getAsset(landmark_id);
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ public:
|
|||
|
||||
protected:
|
||||
void onRegionHandle(const LLUUID& landmark_id);
|
||||
void eraseCallbacks(const LLUUID& landmark_id);
|
||||
void makeCallbacks(const LLUUID& landmark_id);
|
||||
|
||||
typedef std::map<LLUUID, LLLandmark*> landmark_list_t;
|
||||
|
|
|
|||
Loading…
Reference in New Issue