diff options
-rw-r--r-- | linden/indra/newview/llhoverview.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/linden/indra/newview/llhoverview.cpp b/linden/indra/newview/llhoverview.cpp index 8c367ab..6367380 100644 --- a/linden/indra/newview/llhoverview.cpp +++ b/linden/indra/newview/llhoverview.cpp | |||
@@ -480,6 +480,27 @@ void LLHoverView::updateText() | |||
480 | } | 480 | } |
481 | mText.push_back(line); | 481 | mText.push_back(line); |
482 | } | 482 | } |
483 | line.clear(); | ||
484 | S32 prim_count = LLSelectMgr::getInstance()->getHoverObjects()->getObjectCount(); | ||
485 | line.append(llformat("Prims: %d", prim_count)); | ||
486 | mText.push_back(line); | ||
487 | |||
488 | line.clear(); | ||
489 | line.append("Position: "); | ||
490 | |||
491 | LLViewerRegion *region = gAgent.getRegion(); | ||
492 | LLVector3 position = region->getPosRegionFromGlobal(hit_object->getPositionGlobal());//regionp->getOriginAgent(); | ||
493 | LLVector3 mypos = region->getPosRegionFromGlobal(gAgent.getPositionGlobal()); | ||
494 | |||
495 | |||
496 | LLVector3 delta = position - mypos; | ||
497 | F32 distance = (F32)delta.magVec(); | ||
498 | |||
499 | line.append(llformat("<%.02f,%.02f,%.02f>",position.mV[0],position.mV[1],position.mV[2])); | ||
500 | mText.push_back(line); | ||
501 | line.clear(); | ||
502 | line.append(llformat("Distance: %.02fm",distance)); | ||
503 | mText.push_back(line); | ||
483 | 504 | ||
484 | // If the hover tip shouldn't be shown, delete all the object text | 505 | // If the hover tip shouldn't be shown, delete all the object text |
485 | if (suppressObjectHoverDisplay) | 506 | if (suppressObjectHoverDisplay) |