summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2012-04-02 17:26:38 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2012-04-02 17:26:38 -0400
commit7c14e354aedf5de21a3255a467750a09f18e33eb (patch)
tree5b52f70e6a668ddd0bc650779fffc611834ed113 /indra/newview/llvoavatar.cpp
parent02328a13d7a5b6fde9f4a7afa7816e3acc7eee83 (diff)
SH-3064 WIP - centralized logic for mapping rez status S32 values to strings
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rwxr-xr-xindra/newview/llvoavatar.cpp25
1 files changed, 11 insertions, 14 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 1537435526..c6726fa860 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -779,13 +779,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
std::string LLVOAvatar::avString() const
{
- std::string viz_string;
- if (getIsCloud())
- viz_string = "cloud";
- else if (isFullyTextured())
- viz_string = "textured";
- else
- viz_string = "gray";
+ std::string viz_string = LLVOAvatar::rezStatusToString(getRezzedStatus());
return " Avatar '" + getFullname() + "' " + viz_string + " ";
}
@@ -1076,6 +1070,15 @@ void LLVOAvatar::getNearbyRezzedStats(std::vector<S32>& counts)
}
// static
+std::string LLVOAvatar::rezStatusToString(S32 rez_status)
+{
+ if (rez_status==0) return "cloud";
+ if (rez_status==1) return "gray";
+ if (rez_status==2) return "textured";
+ return "unknown";
+}
+
+// static
void LLVOAvatar::dumpBakedStatus()
{
LLVector3d camera_pos_global = gAgentCamera.getCameraPositionGlobal();
@@ -8607,13 +8610,7 @@ void LLVOAvatar::idleUpdateRenderCost()
}
- std::string viz_string;
- if (getIsCloud())
- viz_string = "cloud";
- else if (isFullyTextured())
- viz_string = "textured";
- else
- viz_string = "gray";
+ std::string viz_string = LLVOAvatar::rezStatusToString(getRezzedStatus());
setDebugText(llformat("%s %d", viz_string.c_str(), cost));
mVisualComplexity = cost;
F32 green = 1.f-llclamp(((F32) cost-(F32)ARC_LIMIT)/(F32)ARC_LIMIT, 0.f, 1.f);