Code cleanup
This commit is contained in:
@@ -495,23 +495,11 @@ void LLFloaterTopObjects::onGetByParcelName()
|
|||||||
|
|
||||||
void LLFloaterTopObjects::showBeacon()
|
void LLFloaterTopObjects::showBeacon()
|
||||||
{
|
{
|
||||||
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("objects_list");
|
LLVector3d pos_global = getSelectedPosition();
|
||||||
if (!list) return;
|
if (pos_global.isExactlyZero()) return;
|
||||||
|
LLScrollListItem* first_selected = getChild<LLScrollListCtrl>("objects_list")->getFirstSelected();
|
||||||
LLScrollListItem* first_selected = list->getFirstSelected();
|
|
||||||
if (!first_selected) return;
|
|
||||||
|
|
||||||
std::string name = first_selected->getColumn(1)->getValue().asString();
|
std::string name = first_selected->getColumn(1)->getValue().asString();
|
||||||
std::string pos_string = first_selected->getColumn(3)->getValue().asString();
|
LLTracker::trackLocation(pos_global, name, LLStringUtil::null, LLTracker::LOCATION_ITEM);
|
||||||
|
|
||||||
F32 x, y, z;
|
|
||||||
S32 matched = sscanf(pos_string.c_str(), "<%g,%g,%g>", &x, &y, &z);
|
|
||||||
if (matched != 3) return;
|
|
||||||
|
|
||||||
LLVector3 pos_agent(x, y, z);
|
|
||||||
LLVector3d pos_global = gAgent.getPosGlobalFromAgent(pos_agent);
|
|
||||||
std::string tooltip("");
|
|
||||||
LLTracker::trackLocation(pos_global, name, tooltip, LLTracker::LOCATION_ITEM);
|
|
||||||
|
|
||||||
const LLUUID& taskid = first_selected->getUUID();
|
const LLUUID& taskid = first_selected->getUUID();
|
||||||
if(LLVOAvatar* voavatar = gObjectList.findAvatar(taskid))
|
if(LLVOAvatar* voavatar = gObjectList.findAvatar(taskid))
|
||||||
|
|||||||
Reference in New Issue
Block a user