diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llinspectavatar.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llparticipantlist.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llspeakers.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llspeakers.h | 2 |
4 files changed, 9 insertions, 2 deletions
diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 7f206cb873..72b36374dd 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -402,6 +402,7 @@ void LLInspectAvatar::updateModeratorPanel() LLPointer<LLSpeaker> selected_speakerp = speaker_mgr->findSpeaker(mAvatarID); if(speaker_mgr->isVoiceActive() && selected_speakerp && + selected_speakerp->isInVoiceChannel() && ((self_speakerp && self_speakerp->mIsModerator) || gAgent.isGodlike())) { getChild<LLUICtrl>("enable_voice")->setVisible(selected_speakerp->mModeratorMutedVoice); diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index e2da4c4475..362454ee3c 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -592,8 +592,7 @@ bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& if (speakerp.notNull()) { // not in voice participants can not be moderated - return speakerp->mStatus == LLSpeaker::STATUS_VOICE_ACTIVE - || speakerp->mStatus == LLSpeaker::STATUS_MUTED; + return speakerp->isInVoiceChannel(); } } return false; diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 010dfd1b33..0dd9203c6d 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -88,6 +88,11 @@ void LLSpeaker::onAvatarNameLookup(const LLUUID& id, const std::string& first, c mDisplayName = first + " " + last; } +bool LLSpeaker::isInVoiceChannel() +{ + return mStatus == LLSpeaker::STATUS_VOICE_ACTIVE || mStatus == LLSpeaker::STATUS_MUTED; +} + LLSpeakerUpdateModeratorEvent::LLSpeakerUpdateModeratorEvent(LLSpeaker* source) : LLEvent(source, "Speaker add moderator event"), mSpeakerID (source->mID), diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h index 1a8c23f56a..da8dfdf548 100644 --- a/indra/newview/llspeakers.h +++ b/indra/newview/llspeakers.h @@ -67,6 +67,8 @@ public: void onAvatarNameLookup(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group); + bool isInVoiceChannel(); + ESpeakerStatus mStatus; // current activity status in speech group F32 mLastSpokeTime; // timestamp when this speaker last spoke F32 mSpeechVolume; // current speech amplitude (timea average rms amplitude?) |