summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Guslisty <pguslisty@productengine.com>2010-04-13 08:44:34 +0300
committerPaul Guslisty <pguslisty@productengine.com>2010-04-13 08:44:34 +0300
commitaade7752202d321eb3cf6ed6a9e004ad200689b7 (patch)
treee9df5a469182ee8f57911cd15ba295bc304890f4
parentb78053452fcab2d5cb864ef1fe1a95268a7ed31e (diff)
Fixed normal bug EXT-6624 ('Land for sale' icon isn't showed in Navigation bar after teleport from another land for sale with 'Moderate' rating)
- Reason: after teleport, Agent's content rate compares with just teleported Region's content rate, to check whether Agent can buy a Parcel in this Region. But it compares with old Region ones. Because In method 'LLViewerParcelMgr::canAgentBuyParcel' the call of 'LLViewerParcelMgr::getInstance()->getSelectionRegion()' returns last selected parcel. So after teleport this method call will always return old Region. Solution: In 'LLViewerParcelMgr::canAgentBuyParcel' determine current Parcel Agent is in, then determine Region using Agent's Parcel information and use actual Region. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/222/ --HG-- branch : product-engine
-rw-r--r--indra/newview/llviewerparcelmgr.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 1f6bbcbae8..a591cc1e14 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -2185,7 +2185,8 @@ bool LLViewerParcelMgr::canAgentBuyParcel(LLParcel* parcel, bool forGroup) const
return true; // change this if want to make it gods only
}
- LLViewerRegion* regionp = LLViewerParcelMgr::getInstance()->getSelectionRegion();
+ LLVector3 parcel_coord = parcel->getCenterpoint();
+ LLViewerRegion* regionp = LLWorld::getInstance()->getRegionFromPosAgent(parcel_coord);
if (regionp)
{
U8 sim_access = regionp->getSimAccess();