summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llagent.cpp')
-rw-r--r--indra/newview/llagent.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index eb5d172ff7..2b582c90f0 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -58,6 +58,7 @@
#include "llmoveview.h"
#include "llnavigationbar.h" // to show/hide navigation bar when changing mouse look state
#include "llnearbychatbar.h"
+#include "llnotificationsutil.h"
#include "llparcel.h"
#include "llsdutil.h"
#include "llsidetray.h"
@@ -734,6 +735,10 @@ BOOL LLAgent::canFly()
return parcel->getAllowFly();
}
+BOOL LLAgent::getFlying() const
+{
+ return mControlFlags & AGENT_CONTROL_FLY;
+}
//-----------------------------------------------------------------------------
// setFlying()
@@ -791,7 +796,7 @@ void LLAgent::setFlying(BOOL fly)
// static
void LLAgent::toggleFlying()
{
- BOOL fly = !(gAgent.mControlFlags & AGENT_CONTROL_FLY);
+ BOOL fly = !gAgent.getFlying();
gAgent.setFlying( fly );
gAgent.resetView();
@@ -2300,11 +2305,11 @@ void LLAgent::stopAutoPilot(BOOL user_cancel)
if (user_cancel && !mAutoPilotBehaviorName.empty())
{
if (mAutoPilotBehaviorName == "Sit")
- LLNotifications::instance().add("CancelledSit");
+ LLNotificationsUtil::add("CancelledSit");
else if (mAutoPilotBehaviorName == "Attach")
- LLNotifications::instance().add("CancelledAttach");
+ LLNotificationsUtil::add("CancelledAttach");
else
- LLNotifications::instance().add("Cancelled");
+ LLNotificationsUtil::add("Cancelled");
}
}
}