FIRE-5496: Missing LI for objects outside agent's region
parent
72e93c136e
commit
850a65b032
|
|
@ -1466,35 +1466,25 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l
|
|||
// Display the PE weight for an object if mesh is enabled
|
||||
if (gMeshRepo.meshRezEnabled())
|
||||
{
|
||||
// Ansariel: What a bummer! PE is only available for
|
||||
// objects in the same region as you!
|
||||
if (hover_object->getRegion() && gAgent.getRegion() &&
|
||||
hover_object->getRegion()->getRegionID() == gAgent.getRegion()->getRegionID())
|
||||
S32 link_cost = LLSelectMgr::getInstance()->getHoverObjects()->getSelectedLinksetCost();
|
||||
if (link_cost > 0)
|
||||
{
|
||||
S32 link_cost = LLSelectMgr::getInstance()->getHoverObjects()->getSelectedLinksetCost();
|
||||
if (link_cost > 0)
|
||||
{
|
||||
args.clear();
|
||||
args["PEWEIGHT"] = llformat("%d", link_cost);
|
||||
tooltip_msg.append(LLTrans::getString("TooltipPrimEquivalent", args));
|
||||
}
|
||||
args.clear();
|
||||
args["PEWEIGHT"] = llformat("%d", link_cost);
|
||||
tooltip_msg.append(LLTrans::getString("TooltipPrimEquivalent", args));
|
||||
}
|
||||
/// <FS:CR> Don't show loading on vanila OpenSim (some grids have it, not not vanilla) If they have it, it will
|
||||
/// show eventually
|
||||
#ifdef OPENSIM
|
||||
else if (LLGridManager::getInstance()->isInOpenSim())
|
||||
{
|
||||
// Do nothing at all.
|
||||
}
|
||||
else if (LLGridManager::getInstance()->isInOpenSim())
|
||||
{
|
||||
// Do nothing at all.
|
||||
}
|
||||
#endif
|
||||
// </FS:CR>
|
||||
else
|
||||
{
|
||||
tooltip_msg.append(LLTrans::getString("TooltipPrimEquivalentLoading"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
tooltip_msg.append(LLTrans::getString("TooltipPrimEquivalentUnavailable"));
|
||||
tooltip_msg.append(LLTrans::getString("TooltipPrimEquivalentLoading"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1152,23 +1152,63 @@ void LLViewerObjectList::fetchObjectCosts()
|
|||
// issue http request for stale object physics costs
|
||||
if (!mStaleObjectCost.empty())
|
||||
{
|
||||
LLViewerRegion* regionp = gAgent.getRegion();
|
||||
// <FS:Ansariel> FIRE-5496: Missing LI for objects outside agent's region
|
||||
//LLViewerRegion* regionp = gAgent.getRegion();
|
||||
|
||||
if (regionp)
|
||||
//if (regionp)
|
||||
//{
|
||||
// std::string url = regionp->getCapability("GetObjectCost");
|
||||
|
||||
// if (!url.empty())
|
||||
// {
|
||||
// LLCoros::instance().launch("LLViewerObjectList::fetchObjectCostsCoro",
|
||||
// boost::bind(&LLViewerObjectList::fetchObjectCostsCoro, this, url));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// mStaleObjectCost.clear();
|
||||
// mPendingObjectCost.clear();
|
||||
// }
|
||||
//}
|
||||
|
||||
std::map<LLViewerRegion*, uuid_set_t> regionObjectMap{};
|
||||
|
||||
// Swap it for thread safety since we're going to iterate over it
|
||||
uuid_set_t staleObjectCostIds{};
|
||||
staleObjectCostIds.swap(mStaleObjectCost);
|
||||
|
||||
for (const auto& staleObjectId : staleObjectCostIds)
|
||||
{
|
||||
std::string url = regionp->getCapability("GetObjectCost");
|
||||
LLViewerObject* staleObject = findObject(staleObjectId);
|
||||
if (staleObject && staleObject->getRegion())
|
||||
{
|
||||
if (regionObjectMap.find(staleObject->getRegion()) == regionObjectMap.end())
|
||||
{
|
||||
regionObjectMap.insert(std::make_pair(staleObject->getRegion(), uuid_set_t()));
|
||||
}
|
||||
|
||||
regionObjectMap[staleObject->getRegion()].insert(staleObjectId);
|
||||
}
|
||||
}
|
||||
|
||||
for (auto region : regionObjectMap)
|
||||
{
|
||||
std::string url = region.first->getCapability("GetObjectCost");
|
||||
|
||||
if (!url.empty())
|
||||
{
|
||||
LLCoros::instance().launch("LLViewerObjectList::fetchObjectCostsCoro",
|
||||
boost::bind(&LLViewerObjectList::fetchObjectCostsCoro, this, url));
|
||||
LLCoros::instance().launch("LLViewerObjectList::fetchObjectCostsCoro",
|
||||
boost::bind(&LLViewerObjectList::fetchObjectCostsCoro, this, url, region.second));
|
||||
}
|
||||
else
|
||||
{
|
||||
mStaleObjectCost.clear();
|
||||
mPendingObjectCost.clear();
|
||||
for (const auto& objectId : region.second)
|
||||
{
|
||||
mPendingObjectCost.erase(objectId);
|
||||
}
|
||||
}
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1183,7 +1223,9 @@ void LLViewerObjectList::reportObjectCostFailure(LLSD &objectList)
|
|||
}
|
||||
|
||||
|
||||
void LLViewerObjectList::fetchObjectCostsCoro(std::string url)
|
||||
// <FS:Ansariel> FIRE-5496: Missing LI for objects outside agent's region
|
||||
//void LLViewerObjectList::fetchObjectCostsCoro(std::string url)
|
||||
void LLViewerObjectList::fetchObjectCostsCoro(std::string url, uuid_set_t staleObjects)
|
||||
{
|
||||
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
|
||||
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
|
||||
|
|
@ -1194,11 +1236,16 @@ void LLViewerObjectList::fetchObjectCostsCoro(std::string url)
|
|||
|
||||
uuid_set_t diff;
|
||||
|
||||
std::set_difference(mStaleObjectCost.begin(), mStaleObjectCost.end(),
|
||||
mPendingObjectCost.begin(), mPendingObjectCost.end(),
|
||||
std::inserter(diff, diff.begin()));
|
||||
// <FS:Ansariel> FIRE-5496: Missing LI for objects outside agent's region
|
||||
//std::set_difference(mStaleObjectCost.begin(), mStaleObjectCost.end(),
|
||||
// mPendingObjectCost.begin(), mPendingObjectCost.end(),
|
||||
// std::inserter(diff, diff.begin()));
|
||||
|
||||
mStaleObjectCost.clear();
|
||||
//mStaleObjectCost.clear();
|
||||
std::set_difference(staleObjects.begin(), staleObjects.end(),
|
||||
mPendingObjectCost.begin(), mPendingObjectCost.end(),
|
||||
std::inserter(diff, diff.begin()));
|
||||
// </FS:Ansariel>
|
||||
|
||||
if (diff.empty())
|
||||
{
|
||||
|
|
@ -1265,7 +1312,7 @@ void LLViewerObjectList::fetchObjectCostsCoro(std::string url)
|
|||
|
||||
// <FS:Cron> area search
|
||||
// Update area search to have current information.
|
||||
FSAreaSearch* area_search_floater = LLFloaterReg::getTypedInstance<FSAreaSearch>("area_search");
|
||||
FSAreaSearch* area_search_floater = LLFloaterReg::findTypedInstance<FSAreaSearch>("area_search");
|
||||
if (area_search_floater)
|
||||
{
|
||||
area_search_floater->updateObjectCosts(objectId, objectCost, linkCost, physicsCost, linkPhysicsCost);
|
||||
|
|
|
|||
|
|
@ -253,7 +253,9 @@ protected:
|
|||
|
||||
private:
|
||||
static void reportObjectCostFailure(LLSD &objectList);
|
||||
void fetchObjectCostsCoro(std::string url);
|
||||
// <FS:Ansariel> FIRE-5496: Missing LI for objects outside agent's region
|
||||
//void fetchObjectCostsCoro(std::string url);
|
||||
void fetchObjectCostsCoro(std::string url, uuid_set_t staleObjects);
|
||||
|
||||
static void reportPhysicsFlagFailure(LLSD &obejectList);
|
||||
void fetchPhisicsFlagsCoro(std::string url);
|
||||
|
|
|
|||
|
|
@ -593,9 +593,6 @@ Warten Sie kurz und versuchen Sie dann noch einmal, sich anzumelden.
|
|||
<string name="TooltipPrimEquivalentLoading">
|
||||
, bestimme Auswirkung auf Land...
|
||||
</string>
|
||||
<string name="TooltipPrimEquivalentUnavailable">
|
||||
, Auswirkung auf Land nicht verfügbar
|
||||
</string>
|
||||
<string name="TooltipDistance">
|
||||
Entfernung: [DISTANCE] m
|
||||
</string>
|
||||
|
|
|
|||
|
|
@ -299,7 +299,6 @@ Please try logging in again in a minute.</string>
|
|||
<string name="TooltipPrimCount">Prims: [COUNT]</string>
|
||||
<string name="TooltipPrimEquivalent">, Land Impact: [PEWEIGHT]</string>
|
||||
<string name="TooltipPrimEquivalentLoading">, loading Land Impact...</string>
|
||||
<string name="TooltipPrimEquivalentUnavailable">, Land Impact unavailable</string>
|
||||
<string name="TooltipDistance">Distance: [DISTANCE] m</string>
|
||||
<string name="TooltipPosition">Position: [POSITION]</string>
|
||||
|
||||
|
|
|
|||
|
|
@ -507,7 +507,6 @@ Intenta iniciar sesión de nuevo en unos instantes.
|
|||
<string name="TooltipPrimCount">Primitivas: [COUNT]</string>
|
||||
<string name="TooltipPrimEquivalent">, Impacto en el Terreno: [PEWEIGHT]</string>
|
||||
<string name="TooltipPrimEquivalentLoading">, cargando Impacto en el Terreno...</string>
|
||||
<string name="TooltipPrimEquivalentUnavailable">, Impacto en el terreno no disponible</string>
|
||||
<string name="TooltipDistance">Distancia: [DISTANCE] m</string>
|
||||
<string name="TooltipPosition">Posición: [POSITION]</string>
|
||||
<string name="TooltipOutboxNoTransfer">
|
||||
|
|
|
|||
|
|
@ -573,9 +573,6 @@ Provare ad accedere nuovamente tra un minuto.
|
|||
<string name="TooltipPrimEquivalentLoading">
|
||||
, carico impatto...
|
||||
</string>
|
||||
<string name="TooltipPrimEquivalentUnavailable">
|
||||
, impatto non disp.
|
||||
</string>
|
||||
<string name="TooltipDistance">
|
||||
Distanza: [DISTANCE] m
|
||||
</string>
|
||||
|
|
|
|||
|
|
@ -544,9 +544,6 @@ Spróbuj zalogować się ponownie za minutę.
|
|||
<string name="TooltipPrimEquivalentLoading">
|
||||
, sprawdzanie wpływu na działkę...
|
||||
</string>
|
||||
<string name="TooltipPrimEquivalentUnavailable">
|
||||
, wpływ na działkę niedostępny
|
||||
</string>
|
||||
<string name="TooltipDistance">
|
||||
Odległość: [DISTANCE] m
|
||||
</string>
|
||||
|
|
|
|||
|
|
@ -581,9 +581,6 @@ support@secondlife.com.
|
|||
<string name="TooltipPrimEquivalentЗагрузка">
|
||||
, Загрузка влияния на землю...
|
||||
</string>
|
||||
<string name="TooltipPrimEquivalentUnavailable">
|
||||
, влияние на землю недоступно
|
||||
</string>
|
||||
<string name="TooltipDistance">
|
||||
Расстояние: [DISTANCE] м
|
||||
</string>
|
||||
|
|
|
|||
Loading…
Reference in New Issue