diff options
author | CG Linden <cg@lindenlab.com> | 2010-01-26 13:44:24 -0800 |
---|---|---|
committer | CG Linden <cg@lindenlab.com> | 2010-01-26 13:44:24 -0800 |
commit | b8856efd5ff0e4899bb369dfd0815e824cd3a432 (patch) | |
tree | 4c99369867ed9e58b69dfad4ba8ee3a2e9a17b9b /indra/newview/llavataractions.cpp | |
parent | 5fc9d8bddad16b7d8dc6d481107a8ce690fdf731 (diff) | |
parent | fee564c26e1018787cf70b95fc677c1da447118c (diff) |
Pulled from viewer-2-0
Diffstat (limited to 'indra/newview/llavataractions.cpp')
-rw-r--r-- | indra/newview/llavataractions.cpp | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 40c9bb6afa..7eed2e7b9a 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -250,31 +250,25 @@ void LLAvatarActions::startAdhocCall(const std::vector<LLUUID>& ids) make_ui_sound("UISndStartIM"); } +/* AD *TODO: Is this function needed any more? + I fixed it a bit(added check for canCall), but it appears that it is not used + anywhere. Maybe it should be removed? // static bool LLAvatarActions::isCalling(const LLUUID &id) { - if (id.isNull()) + if (id.isNull() || !canCall()) { return false; } LLUUID session_id = gIMMgr->computeSessionID(IM_NOTHING_SPECIAL, id); return (LLIMModel::getInstance()->findIMSession(session_id) != NULL); -} +}*/ //static -bool LLAvatarActions::canCall(const LLUUID &id) +bool LLAvatarActions::canCall() { - // For now we do not need to check whether passed UUID is ID of agent's friend. - // Use common check of Voice Client state. - { - // don't need to check online/offline status because "usual resident" (resident that is not a friend) - // can be only ONLINE. There is no way to see "usual resident" in OFFLINE status. If we see "usual - // resident" it automatically means that the resident is ONLINE. So to make a call to the "usual resident" - // we need to check only that "our" voice is enabled. - return LLVoiceClient::voiceEnabled(); - } - + return LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking(); } // static |