summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerparcelmgr.cpp
diff options
context:
space:
mode:
authorYchebotarev ProductEngine <ychebotarev@productengine.com>2010-01-19 17:13:21 +0200
committerYchebotarev ProductEngine <ychebotarev@productengine.com>2010-01-19 17:13:21 +0200
commit82de841c52357642d30b6d89b11da079f9c0f5d1 (patch)
tree8ed3ec82392b6afd2ddf2023035fdfa45cd74c0b /indra/newview/llviewerparcelmgr.cpp
parent4610e911c959cdd21728822ae80b9e717ccd3012 (diff)
parent00c05a885fb1cbee967065798f57d74bf47f2478 (diff)
merge
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llviewerparcelmgr.cpp')
-rw-r--r--indra/newview/llviewerparcelmgr.cpp33
1 files changed, 28 insertions, 5 deletions
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 5a5c4e7480..10a95443f1 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -50,7 +50,7 @@
#include "llagent.h"
#include "llviewerwindow.h"
#include "llviewercontrol.h"
-#include "llfirstuse.h"
+//#include "llfirstuse.h"
#include "llfloaterbuyland.h"
#include "llfloatergroups.h"
#include "llfloaternearbymedia.h"
@@ -1320,14 +1320,37 @@ void LLViewerParcelMgr::sendParcelPropertiesUpdate(LLParcel* parcel, bool use_ag
void LLViewerParcelMgr::setHoverParcel(const LLVector3d& pos)
{
- //FIXME: only request parcel info when tooltip is shown
- return;
- /*LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal( pos );
+ static U32 last_west, last_south;
+
+
+ // only request parcel info when tooltip is shown
+ if (!gSavedSettings.getBOOL("ShowLandHoverTip"))
+ {
+ return;
+ }
+
+ // only request parcel info if position has changed outside of the
+ // last parcel grid step
+ U32 west_parcel_step = (U32) floor( pos.mdV[VX] / PARCEL_GRID_STEP_METERS );
+ U32 south_parcel_step = (U32) floor( pos.mdV[VY] / PARCEL_GRID_STEP_METERS );
+
+ if ((west_parcel_step == last_west) && (south_parcel_step == last_south))
+ {
+ return;
+ }
+ else
+ {
+ last_west = west_parcel_step;
+ last_south = south_parcel_step;
+ }
+
+ LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal( pos );
if (!region)
{
return;
}
+
// Send a rectangle around the point.
// This means the parcel sent back is at least a rectangle around the point,
// which is more efficient for public land. Fewer requests are sent. JC
@@ -1354,7 +1377,7 @@ void LLViewerParcelMgr::setHoverParcel(const LLVector3d& pos)
msg->addBOOL("SnapSelection", FALSE );
msg->sendReliable( region->getHost() );
- mHoverRequestResult = PARCEL_RESULT_NO_DATA;*/
+ mHoverRequestResult = PARCEL_RESULT_NO_DATA;
}