From 94e6e10739c8321b6fb651a109901380ef92975a Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Mon, 29 Mar 2010 12:00:26 -0400 Subject: EXT-6536 : Make LLVOAvatarSelf a singleton Superficial cleanup to replace all instances of "LLVOAvatarSelf *avatarp = gAgent.getAvatarObject" with "gAgentAvatar". --- indra/newview/llmoveview.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/newview/llmoveview.cpp') diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 58fac14349..b47acefc76 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -42,7 +42,7 @@ #include "llagent.h" #include "llagentcamera.h" -#include "llvoavatarself.h" // to check gAgent.getAvatarObject()->isSitting() +#include "llvoavatarself.h" // to check gAgentAvatar->isSitting() #include "llbottomtray.h" #include "llbutton.h" #include "llfloaterreg.h" @@ -332,7 +332,7 @@ void LLFloaterMove::setMovementMode(const EMovementMode mode) updateButtonsWithMovementMode(mode); bool bHideModeButtons = MM_FLY == mode - || (gAgent.getAvatarObject() && gAgent.getAvatarObject()->isSitting()); + || (isAgentAvatarValid() && gAgentAvatar->isSitting()); showModeButtons(!bHideModeButtons); @@ -388,9 +388,9 @@ void LLFloaterMove::initMovementMode() } setMovementMode(initMovementMode); - if (gAgent.getAvatarObject()) + if (isAgentAvatarValid()) { - setEnabled(!gAgent.getAvatarObject()->isSitting()); + setEnabled(!gAgentAvatar->isSitting()); } } @@ -491,7 +491,7 @@ void LLFloaterMove::onOpen(const LLSD& key) showModeButtons(FALSE); } - if (gAgent.getAvatarObject() && gAgent.getAvatarObject()->isSitting()) + if (isAgentAvatarValid() && gAgentAvatar->isSitting()) { setSittingMode(TRUE); showModeButtons(FALSE); -- cgit v1.2.3 From 58d76a9ecf83b49e42fabfada27ca20814f93cf3 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Mon, 29 Mar 2010 12:11:51 -0400 Subject: EXT-6536 : Make LLVOAvatarSelf a singleton Superficial cleanup to replace all instances of "gAgentAvatar" with "gAgentAvatarp". --- indra/newview/llmoveview.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llmoveview.cpp') diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index b47acefc76..0f22a50093 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -42,7 +42,7 @@ #include "llagent.h" #include "llagentcamera.h" -#include "llvoavatarself.h" // to check gAgentAvatar->isSitting() +#include "llvoavatarself.h" // to check gAgentAvatarp->isSitting() #include "llbottomtray.h" #include "llbutton.h" #include "llfloaterreg.h" @@ -332,7 +332,7 @@ void LLFloaterMove::setMovementMode(const EMovementMode mode) updateButtonsWithMovementMode(mode); bool bHideModeButtons = MM_FLY == mode - || (isAgentAvatarValid() && gAgentAvatar->isSitting()); + || (isAgentAvatarValid() && gAgentAvatarp->isSitting()); showModeButtons(!bHideModeButtons); @@ -390,7 +390,7 @@ void LLFloaterMove::initMovementMode() if (isAgentAvatarValid()) { - setEnabled(!gAgentAvatar->isSitting()); + setEnabled(!gAgentAvatarp->isSitting()); } } @@ -491,7 +491,7 @@ void LLFloaterMove::onOpen(const LLSD& key) showModeButtons(FALSE); } - if (isAgentAvatarValid() && gAgentAvatar->isSitting()) + if (isAgentAvatarValid() && gAgentAvatarp->isSitting()) { setSittingMode(TRUE); showModeButtons(FALSE); -- cgit v1.2.3