From 4a293ff1e19c7dfab55433d73a3eaf23ba968898 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Tue, 7 Jan 2020 11:46:06 -0500 Subject: [PATCH] Clean up excess teleport to code using get_av_pos --- indra/newview/llfloateravatarlist.cpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/indra/newview/llfloateravatarlist.cpp b/indra/newview/llfloateravatarlist.cpp index c5783c322..5517d7df0 100644 --- a/indra/newview/llfloateravatarlist.cpp +++ b/indra/newview/llfloateravatarlist.cpp @@ -347,18 +347,6 @@ void track_av(const LLUUID& id) LLTracker::trackLocation(avatars[id], LLStringUtil::null, LLStringUtil::null); } -void teleport_to(const LLUUID& id) -{ - if (auto entry = LLFloaterAvatarList::instanceExists() ? LLFloaterAvatarList::instance().getAvatarEntry(id) : nullptr) - gAgent.teleportViaLocation(entry->getPosition()); - else - { - LLWorld::pos_map_t avatars; - LLWorld::instance().getAvatars(&avatars); - gAgent.teleportViaLocation(avatars[id]); - } -} - static void cmd_profile(const LLAvatarListEntry* entry); static void cmd_toggle_mark(LLAvatarListEntry* entry); static void cmd_ar(const LLAvatarListEntry* entry); @@ -416,7 +404,7 @@ namespace { bool handleEvent(LLPointer event, const LLSD& userdata) { - teleport_to(LFIDBearer::getActiveSelectedID()); + gAgent.teleportViaLocation(get_av_pos(LFIDBearer::getActiveSelectedID())); return true; } };