summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatarself.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-03-26 13:58:19 -0400
committerLoren Shih <seraph@lindenlab.com>2010-03-26 13:58:19 -0400
commit0bcfbde3a4265d7963ea501622e512de8eab7f61 (patch)
tree9947dc73b2be9bc6bb4907938b67bf5c3fee4d09 /indra/newview/llvoavatarself.cpp
parentb74e1d942352e81e0cc00e21ef3b351152b32248 (diff)
EXT-6536 : Make LLVOAvatarSelf a singleton
Lots of superficial cleanup, particularly around "if (" formatting. Removed LLAgent as a friend of LLAgentCamera and refactored to use accessors.
Diffstat (limited to 'indra/newview/llvoavatarself.cpp')
-rw-r--r--indra/newview/llvoavatarself.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 15be6b23b3..0243130e12 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -777,7 +777,8 @@ void LLVOAvatarSelf::removeMissingBakedTextures()
//virtual
void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp)
{
- if (regionp->getHandle() != mLastRegionHandle)
+ setRegion(regionp);
+ if (!regionp || (regionp->getHandle() != mLastRegionHandle))
{
if (mLastRegionHandle != 0)
{
@@ -791,7 +792,10 @@ void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp)
max = llmax(delta, max);
LLViewerStats::getInstance()->setStat(LLViewerStats::ST_CROSSING_MAX, max);
}
- mLastRegionHandle = regionp->getHandle();
+ if (regionp)
+ {
+ mLastRegionHandle = regionp->getHandle();
+ }
}
mRegionCrossingTimer.reset();
}