From 42f60042eb26e88b0a78457271b88b4675aef427 Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Tue, 14 Jun 2011 14:13:43 +0200 Subject: [PATCH] Idle timer tag update fix, by phr0z3nt04st --- indra/newview/llvoavatar.cpp | 13 ++++++++++--- indra/newview/llvoavatar.h | 1 + 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 4f2b44210..ac4462875 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3801,6 +3801,12 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) { is_muted = LLMuteList::getInstance()->isMuted(getID()); } + //idle text + std::string idle_string; + if(!mIsSelf && mIdleTimer.getElapsedTimeF32() > 120 && gSavedSettings.getBOOL("AscentShowIdleTime")) + { + idle_string = getIdleTime(); + } if ((mNameString.empty() && !(mNameFromChatOverride && mNameFromChatText.empty())) || new_name || @@ -3809,7 +3815,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) (!title && !mTitle.empty()) || (title && mTitle != title->getString()) || (is_away != mNameAway || is_busy != mNameBusy || is_muted != mNameMute) || - is_appearance != mNameAppearance || client != mClientName || + is_appearance != mNameAppearance || client != mClientName || idle_string != mIdleString || mNameFromAttachment != nameplate || mNameFromChatChanged) { @@ -3819,6 +3825,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) mNameBusy = is_busy; mNameMute = is_muted; mClientName = client; + mIdleString = idle_string; mUsedNameSystem = phoenix_name_system; mNameAppearance = is_appearance; mTitle = title? title->getString() : ""; @@ -3949,10 +3956,10 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) line += "\n"; line += "(Editing Appearance)"; } - if(!isSelf() && mIdleTimer.getElapsedTimeF32() > 120 && gSavedSettings.getBOOL("AscentShowIdleTime")) + if(!mIdleString.empty()) { line += "\n"; - line += getIdleTime(); + line += mIdleString; } mNameString = utf8str_to_wstring(line); diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 6ec9179c8..b50111e40 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -942,6 +942,7 @@ private: bool mRenderGroupTitles; std::string mRenderedName; std::string mClientName; + std::string mIdleString; S32 mUsedNameSystem; //--------------------------------------------------------------------