summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerdisplay.cpp
diff options
context:
space:
mode:
authorAimee Linden <aimee@lindenlab.com>2010-03-29 17:53:21 +0100
committerAimee Linden <aimee@lindenlab.com>2010-03-29 17:53:21 +0100
commiteb0aaff4aac1dcf9f238242c107df650584efdf9 (patch)
treeb07b612c33f23e820492b06488a8c406856b64c8 /indra/newview/llviewerdisplay.cpp
parentfc0906d6e8c1238fe7fd21c185957ca89511e76e (diff)
parentb6e7850c0a3d65ed0a1501e19a1655055000e32f (diff)
Merge
Diffstat (limited to 'indra/newview/llviewerdisplay.cpp')
-rw-r--r--indra/newview/llviewerdisplay.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 5a2b901bd7..823466e33e 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -345,9 +345,9 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
const F32 TELEPORT_ARRIVAL_DELAY = 2.f; // Time to preload the world before raising the curtain after we've actually already arrived.
S32 attach_count = 0;
- if (gAgent.getAvatarObject())
+ if (isAgentAvatarValid())
{
- attach_count = gAgent.getAvatarObject()->getAttachmentCount();
+ attach_count = gAgentAvatarp->getAttachmentCount();
}
F32 teleport_save_time = TELEPORT_EXPIRY + TELEPORT_EXPIRY_PER_ATTACHMENT * attach_count;
F32 teleport_elapsed = gTeleportDisplayTimer.getElapsedTimeF32();
@@ -1032,11 +1032,10 @@ LLRect get_whole_screen_region()
bool get_hud_matrices(const LLRect& screen_region, glh::matrix4f &proj, glh::matrix4f &model)
{
- LLVOAvatar* my_avatarp = gAgent.getAvatarObject();
- if (my_avatarp && my_avatarp->hasHUDAttachment())
+ if (isAgentAvatarValid() && gAgentAvatarp->hasHUDAttachment())
{
F32 zoom_level = gAgentCamera.mHUDCurZoom;
- LLBBox hud_bbox = my_avatarp->getHUDBBox();
+ LLBBox hud_bbox = gAgentAvatarp->getHUDBBox();
F32 hud_depth = llmax(1.f, hud_bbox.getExtentLocal().mV[VX] * 1.1f);
proj = gl_ortho(-0.5f * LLViewerCamera::getInstance()->getAspect(), 0.5f * LLViewerCamera::getInstance()->getAspect(), -0.5f, 0.5f, 0.f, hud_depth);
@@ -1300,7 +1299,7 @@ void render_ui_2d()
gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
// render outline for HUD
- if (gAgent.getAvatarObject() && gAgentCamera.mHUDCurZoom < 0.98f)
+ if (isAgentAvatarValid() && gAgentCamera.mHUDCurZoom < 0.98f)
{
glPushMatrix();
S32 half_width = (gViewerWindow->getWorldViewWidthScaled() / 2);