From 0c3bd94da9ba2244613b6c1f1f0e4ce9723c46d3 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Mon, 23 Nov 2009 15:16:19 -0500 Subject: EXT-2435 : Advanced > Shortcuts > Fly is always ticked Did a few lines of cleanup for code surrounding this. Issue is still not fixed though. --HG-- branch : avatar-pipeline --- indra/newview/llagent.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index fb2ecb3bed..9b3e97e8d8 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -734,6 +734,10 @@ BOOL LLAgent::canFly() return parcel->getAllowFly(); } +BOOL LLAgent::getFlying() const +{ + return mControlFlags & AGENT_CONTROL_FLY; +} //----------------------------------------------------------------------------- // setFlying() @@ -791,7 +795,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(); -- cgit v1.2.3