aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llhoverview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llhoverview.cpp')
-rw-r--r--linden/indra/newview/llhoverview.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/linden/indra/newview/llhoverview.cpp b/linden/indra/newview/llhoverview.cpp
index c19b361..6d0dd72 100644
--- a/linden/indra/newview/llhoverview.cpp
+++ b/linden/indra/newview/llhoverview.cpp
@@ -136,7 +136,7 @@ void LLHoverView::updateHover(LLTool* current_tool)
136 } 136 }
137 else if (mStartHoverTimer.getElapsedTimeF32() > DELAY_BEFORE_SHOW_TIP) 137 else if (mStartHoverTimer.getElapsedTimeF32() > DELAY_BEFORE_SHOW_TIP)
138 { 138 {
139 gViewerWindow->hitObjectOrLandGlobalAsync(gViewerWindow->getCurrentMouseX(), 139 gViewerWindow->pickAsync(gViewerWindow->getCurrentMouseX(),
140 gViewerWindow->getCurrentMouseY(), 0, pickCallback ); 140 gViewerWindow->getCurrentMouseY(), 0, pickCallback );
141 } 141 }
142 } 142 }
@@ -148,16 +148,16 @@ void LLHoverView::updateHover(LLTool* current_tool)
148 148
149} 149}
150 150
151void LLHoverView::pickCallback(S32 x, S32 y, MASK mask) 151void LLHoverView::pickCallback(const LLPickInfo& pick_info)
152{ 152{
153 LLViewerObject* hit_obj = gViewerWindow->lastObjectHit(); 153 LLViewerObject* hit_obj = pick_info.getObject();
154 154
155 if (hit_obj) 155 if (hit_obj)
156 { 156 {
157 gHoverView->setHoverActive(TRUE); 157 gHoverView->setHoverActive(TRUE);
158 LLSelectMgr::getInstance()->setHoverObject(hit_obj); 158 LLSelectMgr::getInstance()->setHoverObject(hit_obj);
159 gHoverView->mLastHoverObject = hit_obj; 159 gHoverView->mLastHoverObject = hit_obj;
160 gHoverView->mHoverOffset = gViewerWindow->lastObjectHitOffset(); 160 gHoverView->mHoverOffset = pick_info.mObjectOffset;
161 } 161 }
162 else 162 else
163 { 163 {
@@ -165,10 +165,10 @@ void LLHoverView::pickCallback(S32 x, S32 y, MASK mask)
165 } 165 }
166 166
167 // We didn't hit an object, but we did hit land. 167 // We didn't hit an object, but we did hit land.
168 if (!hit_obj && gLastHitPosGlobal != LLVector3d::zero) 168 if (!hit_obj && pick_info.mPosGlobal != LLVector3d::zero)
169 { 169 {
170 gHoverView->setHoverActive(TRUE); 170 gHoverView->setHoverActive(TRUE);
171 gHoverView->mHoverLandGlobal = gLastHitPosGlobal; 171 gHoverView->mHoverLandGlobal = pick_info.mPosGlobal;
172 LLViewerParcelMgr::getInstance()->requestHoverParcelProperties( gHoverView->mHoverLandGlobal ); 172 LLViewerParcelMgr::getInstance()->requestHoverParcelProperties( gHoverView->mHoverLandGlobal );
173 } 173 }
174 else 174 else
@@ -413,7 +413,7 @@ void LLHoverView::updateText()
413 } 413 }
414 else if (for_sale) 414 else if (for_sale)
415 { 415 {
416 LLString::format_map_t args; 416 LLStringUtil::format_map_t args;
417 args["[AMOUNT]"] = llformat("%d", nodep->mSaleInfo.getSalePrice()); 417 args["[AMOUNT]"] = llformat("%d", nodep->mSaleInfo.getSalePrice());
418 line.append(LLTrans::getString("TooltipForSaleL$", args)); 418 line.append(LLTrans::getString("TooltipForSaleL$", args));
419 suppressObjectHoverDisplay = FALSE; // Show tip 419 suppressObjectHoverDisplay = FALSE; // Show tip
@@ -426,7 +426,7 @@ void LLHoverView::updateText()
426 } 426 }
427 else 427 else
428 { 428 {
429 LLString::format_map_t args; 429 LLStringUtil::format_map_t args;
430 args["[MESSAGE]"] = LLTrans::getString("RetrievingData"); 430 args["[MESSAGE]"] = LLTrans::getString("RetrievingData");
431 line.append(LLTrans::getString("TooltipForSaleMsg", args)); 431 line.append(LLTrans::getString("TooltipForSaleMsg", args));
432 } 432 }
@@ -588,7 +588,7 @@ void LLHoverView::updateText()
588 */ 588 */
589 if (hover_parcel && hover_parcel->getParcelFlag(PF_FOR_SALE)) 589 if (hover_parcel && hover_parcel->getParcelFlag(PF_FOR_SALE))
590 { 590 {
591 LLString::format_map_t args; 591 LLStringUtil::format_map_t args;
592 args["[AMOUNT]"] = llformat("%d", hover_parcel->getSalePrice()); 592 args["[AMOUNT]"] = llformat("%d", hover_parcel->getSalePrice());
593 line = LLTrans::getString("TooltipForSaleL$", args); 593 line = LLTrans::getString("TooltipForSaleL$", args);
594 mText.push_back(line); 594 mText.push_back(line);
@@ -635,8 +635,7 @@ void LLHoverView::draw()
635 } 635 }
636 else 636 else
637 { 637 {
638 LLVector3 local_offset((F32)mHoverOffset.mdV[VX], (F32)mHoverOffset.mdV[VY], (F32)mHoverOffset.mdV[VZ]); 638 gAgent.setLookAt(LOOKAT_TARGET_HOVER, getLastHoverObject(), mHoverOffset);
639 gAgent.setLookAt(LOOKAT_TARGET_HOVER, getLastHoverObject(), local_offset);
640 } 639 }
641 } 640 }
642 } 641 }