diff options
author | Callum Prentice <callum@lindenlab.com> | 2010-04-02 14:57:12 -0700 |
---|---|---|
committer | Callum Prentice <callum@lindenlab.com> | 2010-04-02 14:57:12 -0700 |
commit | 98e46e28e05c22c02da41603a056c0caf34f5ad0 (patch) | |
tree | a24352a4ce377d91428554aab15f96f887b24514 /indra/newview/llavataractions.cpp | |
parent | 9e1b600d9b41afea62b2ba68fa8d5bc5861d1111 (diff) | |
parent | 2c5c563319d5ba8eaeae93b627536321956d347e (diff) |
Merge with tip
Diffstat (limited to 'indra/newview/llavataractions.cpp')
-rw-r--r-- | indra/newview/llavataractions.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 4075ad8ee2..48a85dc73f 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -161,6 +161,14 @@ void LLAvatarActions::offerTeleport(const LLUUID& invitee) if (invitee.isNull()) return; + //waiting until Name Cache gets updated with corresponding avatar name + std::string just_to_request_name; + if (!gCacheName->getFullName(invitee, just_to_request_name)) + { + gCacheName->get(invitee, FALSE, boost::bind((void (*)(const LLUUID&)) &LLAvatarActions::offerTeleport, invitee)); + return; + } + LLDynamicArray<LLUUID> ids; ids.push_back(invitee); offerTeleport(ids); @@ -274,7 +282,7 @@ bool LLAvatarActions::isCalling(const LLUUID &id) //static bool LLAvatarActions::canCall() { - return LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking(); + return LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking(); } // static @@ -434,6 +442,20 @@ void LLAvatarActions::toggleBlock(const LLUUID& id) LLMuteList::getInstance()->add(mute); } } +// static +bool LLAvatarActions::canOfferTeleport(const LLUUID& id) +{ + // First use LLAvatarTracker::isBuddy() + // If LLAvatarTracker::instance().isBuddyOnline function only is used + // then for avatars that are online and not a friend it will return false. + // But we should give an ability to offer a teleport for such avatars. + if(LLAvatarTracker::instance().isBuddy(id)) + { + return LLAvatarTracker::instance().isBuddyOnline(id); + } + + return true; +} void LLAvatarActions::inviteToGroup(const LLUUID& id) { |