Idle timer tag update fix, by phr0z3nt04st

This commit is contained in:
Siana Gearz
2011-06-14 14:13:43 +02:00
parent 96a506a1d5
commit 42f60042eb
2 changed files with 11 additions and 3 deletions

View File

@@ -3801,6 +3801,12 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
{ {
is_muted = LLMuteList::getInstance()->isMuted(getID()); 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())) || if ((mNameString.empty() && !(mNameFromChatOverride && mNameFromChatText.empty())) ||
new_name || new_name ||
@@ -3809,7 +3815,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
(!title && !mTitle.empty()) || (!title && !mTitle.empty()) ||
(title && mTitle != title->getString()) || (title && mTitle != title->getString()) ||
(is_away != mNameAway || is_busy != mNameBusy || is_muted != mNameMute) || (is_away != mNameAway || is_busy != mNameBusy || is_muted != mNameMute) ||
is_appearance != mNameAppearance || client != mClientName || is_appearance != mNameAppearance || client != mClientName || idle_string != mIdleString ||
mNameFromAttachment != nameplate || mNameFromAttachment != nameplate ||
mNameFromChatChanged) mNameFromChatChanged)
{ {
@@ -3819,6 +3825,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
mNameBusy = is_busy; mNameBusy = is_busy;
mNameMute = is_muted; mNameMute = is_muted;
mClientName = client; mClientName = client;
mIdleString = idle_string;
mUsedNameSystem = phoenix_name_system; mUsedNameSystem = phoenix_name_system;
mNameAppearance = is_appearance; mNameAppearance = is_appearance;
mTitle = title? title->getString() : ""; mTitle = title? title->getString() : "";
@@ -3949,10 +3956,10 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
line += "\n"; line += "\n";
line += "(Editing Appearance)"; line += "(Editing Appearance)";
} }
if(!isSelf() && mIdleTimer.getElapsedTimeF32() > 120 && gSavedSettings.getBOOL("AscentShowIdleTime")) if(!mIdleString.empty())
{ {
line += "\n"; line += "\n";
line += getIdleTime(); line += mIdleString;
} }
mNameString = utf8str_to_wstring(line); mNameString = utf8str_to_wstring(line);

View File

@@ -942,6 +942,7 @@ private:
bool mRenderGroupTitles; bool mRenderGroupTitles;
std::string mRenderedName; std::string mRenderedName;
std::string mClientName; std::string mClientName;
std::string mIdleString;
S32 mUsedNameSystem; S32 mUsedNameSystem;
//-------------------------------------------------------------------- //--------------------------------------------------------------------