diff options
author | Jacek Antonelli | 2008-08-15 23:45:19 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:19 -0500 |
commit | b235c59d60472f818a9142c0886b95a0ff4191d7 (patch) | |
tree | d323c55587584b19cc43a03f58a178823f12d3cd /linden/indra/newview/llagent.cpp | |
parent | Second Life viewer sources 1.18.5.3 (diff) | |
download | meta-impy-b235c59d60472f818a9142c0886b95a0ff4191d7.zip meta-impy-b235c59d60472f818a9142c0886b95a0ff4191d7.tar.gz meta-impy-b235c59d60472f818a9142c0886b95a0ff4191d7.tar.bz2 meta-impy-b235c59d60472f818a9142c0886b95a0ff4191d7.tar.xz |
Second Life viewer sources 1.18.6.0-RC
Diffstat (limited to 'linden/indra/newview/llagent.cpp')
-rw-r--r-- | linden/indra/newview/llagent.cpp | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp index 8b49d54..39d4a3f 100644 --- a/linden/indra/newview/llagent.cpp +++ b/linden/indra/newview/llagent.cpp | |||
@@ -112,6 +112,7 @@ | |||
112 | #include "llviewerregion.h" | 112 | #include "llviewerregion.h" |
113 | #include "llviewerstats.h" | 113 | #include "llviewerstats.h" |
114 | #include "llviewerwindow.h" | 114 | #include "llviewerwindow.h" |
115 | #include "llviewerdisplay.h" | ||
115 | #include "llvoavatar.h" | 116 | #include "llvoavatar.h" |
116 | #include "llvoground.h" | 117 | #include "llvoground.h" |
117 | #include "llvosky.h" | 118 | #include "llvosky.h" |
@@ -121,7 +122,8 @@ | |||
121 | #include "llworldmap.h" | 122 | #include "llworldmap.h" |
122 | #include "pipeline.h" | 123 | #include "pipeline.h" |
123 | #include "roles_constants.h" | 124 | #include "roles_constants.h" |
124 | #include "viewer.h" | 125 | #include "llviewercontrol.h" |
126 | #include "llappviewer.h" | ||
125 | #include "llvoiceclient.h" | 127 | #include "llvoiceclient.h" |
126 | 128 | ||
127 | // Ventrella | 129 | // Ventrella |
@@ -130,7 +132,6 @@ | |||
130 | 132 | ||
131 | extern LLMenuBarGL* gMenuBarView; | 133 | extern LLMenuBarGL* gMenuBarView; |
132 | extern U8 gLastPickAlpha; | 134 | extern U8 gLastPickAlpha; |
133 | extern F32 gFrameDTClamped; | ||
134 | 135 | ||
135 | //drone wandering constants | 136 | //drone wandering constants |
136 | const F32 MAX_WANDER_TIME = 20.f; // seconds | 137 | const F32 MAX_WANDER_TIME = 20.f; // seconds |
@@ -222,6 +223,9 @@ const LLUUID BAKED_TEXTURE_HASH[BAKED_TEXTURE_COUNT] = | |||
222 | LLUUID("ea800387-ea1a-14e0-56cb-24f2022f969a") | 223 | LLUUID("ea800387-ea1a-14e0-56cb-24f2022f969a") |
223 | }; | 224 | }; |
224 | 225 | ||
226 | // The agent instance. | ||
227 | LLAgent gAgent; | ||
228 | |||
225 | // | 229 | // |
226 | // Statics | 230 | // Statics |
227 | // | 231 | // |
@@ -523,6 +527,21 @@ void LLAgent::resetView(BOOL reset_camera) | |||
523 | } | 527 | } |
524 | } | 528 | } |
525 | 529 | ||
530 | // Handle any actions that need to be performed when the main app gains focus | ||
531 | // (such as through alt-tab). | ||
532 | //----------------------------------------------------------------------------- | ||
533 | // onAppFocusGained() | ||
534 | //----------------------------------------------------------------------------- | ||
535 | void LLAgent::onAppFocusGained() | ||
536 | { | ||
537 | if (CAMERA_MODE_MOUSELOOK == mCameraMode) | ||
538 | { | ||
539 | changeCameraToDefault(); | ||
540 | gToolMgr->clearSavedTool(); | ||
541 | } | ||
542 | } | ||
543 | |||
544 | |||
526 | void LLAgent::ageChat() | 545 | void LLAgent::ageChat() |
527 | { | 546 | { |
528 | if (mAvatarObject) | 547 | if (mAvatarObject) |
@@ -2545,8 +2564,8 @@ void LLAgent::updateLookAt(const S32 mouse_x, const S32 mouse_y) | |||
2545 | LLVector3 headLookAxis; | 2564 | LLVector3 headLookAxis; |
2546 | LLCoordFrame frameCamera = *((LLCoordFrame*)gCamera); | 2565 | LLCoordFrame frameCamera = *((LLCoordFrame*)gCamera); |
2547 | 2566 | ||
2548 | F32 x_from_center = mouse_x_from_center( mouse_x ); // range from -0.5 to 0.5 | 2567 | F32 x_from_center = ((F32) mouse_x / (F32) gViewerWindow->getWindowWidth() ) - 0.5f; |
2549 | F32 y_from_center = mouse_y_from_center( mouse_y ); // range from -0.5 to 0.5 | 2568 | F32 y_from_center = ((F32) mouse_y / (F32) gViewerWindow->getWindowHeight() ) - 0.5f; |
2550 | 2569 | ||
2551 | if (cameraMouselook()) | 2570 | if (cameraMouselook()) |
2552 | { | 2571 | { |
@@ -2811,7 +2830,7 @@ void LLAgent::endAnimationUpdateUI() | |||
2811 | 2830 | ||
2812 | // HACK: If we're quitting, and we were in customize avatar, don't | 2831 | // HACK: If we're quitting, and we were in customize avatar, don't |
2813 | // let the mini-map go visible again. JC | 2832 | // let the mini-map go visible again. JC |
2814 | if (!gQuitRequested) | 2833 | if (!LLAppViewer::instance()->quitRequested()) |
2815 | { | 2834 | { |
2816 | gFloaterMap->popVisible(); | 2835 | gFloaterMap->popVisible(); |
2817 | } | 2836 | } |
@@ -5836,7 +5855,7 @@ void LLAgent::requestEnterGodMode() | |||
5836 | msg->addBOOLFast(_PREHASH_Godlike, TRUE); | 5855 | msg->addBOOLFast(_PREHASH_Godlike, TRUE); |
5837 | msg->addUUIDFast(_PREHASH_Token, LLUUID::null); | 5856 | msg->addUUIDFast(_PREHASH_Token, LLUUID::null); |
5838 | 5857 | ||
5839 | // simulator and userserver need to know about your request | 5858 | // simulators need to know about your request |
5840 | sendReliableMessage(); | 5859 | sendReliableMessage(); |
5841 | } | 5860 | } |
5842 | 5861 | ||
@@ -5851,7 +5870,7 @@ void LLAgent::requestLeaveGodMode() | |||
5851 | msg->addBOOLFast(_PREHASH_Godlike, FALSE); | 5870 | msg->addBOOLFast(_PREHASH_Godlike, FALSE); |
5852 | msg->addUUIDFast(_PREHASH_Token, LLUUID::null); | 5871 | msg->addUUIDFast(_PREHASH_Token, LLUUID::null); |
5853 | 5872 | ||
5854 | // simulator and userserver need to know about your request | 5873 | // simulator needs to know about your request |
5855 | sendReliableMessage(); | 5874 | sendReliableMessage(); |
5856 | } | 5875 | } |
5857 | 5876 | ||