summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2007-11-07 22:55:27 +0000
committerSteven Bennetts <steve@lindenlab.com>2007-11-07 22:55:27 +0000
commit050dad0ce35207a4ac1562175e853590ad9b7681 (patch)
treebe5dc291d2313112e5733d8c004edfe67da6fc54 /indra/newview/llagent.cpp
parent6fd04521d720a3a4904069d10e8ed970d870ba7f (diff)
merge svn+ssh://steve@svn/svn/linden/branches/viewer-cleanup-3 -r 73026:73079
Diffstat (limited to 'indra/newview/llagent.cpp')
-rw-r--r--indra/newview/llagent.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index a19107dd9c..54f6741fee 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -112,6 +112,7 @@
#include "llviewerregion.h"
#include "llviewerstats.h"
#include "llviewerwindow.h"
+#include "llviewerdisplay.h"
#include "llvoavatar.h"
#include "llvoground.h"
#include "llvosky.h"
@@ -121,7 +122,8 @@
#include "llworldmap.h"
#include "pipeline.h"
#include "roles_constants.h"
-#include "viewer.h"
+#include "llviewercontrol.h"
+#include "llappviewer.h"
#include "llvoiceclient.h"
// Ventrella
@@ -130,7 +132,6 @@
extern LLMenuBarGL* gMenuBarView;
extern U8 gLastPickAlpha;
-extern F32 gFrameDTClamped;
//drone wandering constants
const F32 MAX_WANDER_TIME = 20.f; // seconds
@@ -222,6 +223,9 @@ const LLUUID BAKED_TEXTURE_HASH[BAKED_TEXTURE_COUNT] =
LLUUID("ea800387-ea1a-14e0-56cb-24f2022f969a")
};
+// The agent instance.
+LLAgent gAgent;
+
//
// Statics
//
@@ -2545,8 +2549,8 @@ void LLAgent::updateLookAt(const S32 mouse_x, const S32 mouse_y)
LLVector3 headLookAxis;
LLCoordFrame frameCamera = *((LLCoordFrame*)gCamera);
- F32 x_from_center = mouse_x_from_center( mouse_x ); // range from -0.5 to 0.5
- F32 y_from_center = mouse_y_from_center( mouse_y ); // range from -0.5 to 0.5
+ F32 x_from_center = ((F32) mouse_x / (F32) gViewerWindow->getWindowWidth() ) - 0.5f;
+ F32 y_from_center = ((F32) mouse_y / (F32) gViewerWindow->getWindowHeight() ) - 0.5f;
if (cameraMouselook())
{
@@ -2811,7 +2815,7 @@ void LLAgent::endAnimationUpdateUI()
// HACK: If we're quitting, and we were in customize avatar, don't
// let the mini-map go visible again. JC
- if (!gQuitRequested)
+ if (!LLAppViewer::instance()->quitRequested())
{
gFloaterMap->popVisible();
}
@@ -5828,7 +5832,7 @@ void LLAgent::requestEnterGodMode()
msg->addBOOLFast(_PREHASH_Godlike, TRUE);
msg->addUUIDFast(_PREHASH_Token, LLUUID::null);
- // simulator and userserver need to know about your request
+ // simulators need to know about your request
sendReliableMessage();
}
@@ -5843,7 +5847,7 @@ void LLAgent::requestLeaveGodMode()
msg->addBOOLFast(_PREHASH_Godlike, FALSE);
msg->addUUIDFast(_PREHASH_Token, LLUUID::null);
- // simulator and userserver need to know about your request
+ // simulator needs to know about your request
sendReliableMessage();
}