Clean up excess teleport to code using get_av_pos

This commit is contained in:
Liru Færs
2020-01-07 11:46:06 -05:00
parent 828307ca96
commit 4a293ff1e1

View File

@@ -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<LLEvent> event, const LLSD& userdata)
{
teleport_to(LFIDBearer::getActiveSelectedID());
gAgent.teleportViaLocation(get_av_pos(LFIDBearer::getActiveSelectedID()));
return true;
}
};