diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llagent.h | 71 |
1 files changed, 40 insertions, 31 deletions
diff --git a/linden/indra/newview/llagent.h b/linden/indra/newview/llagent.h index 2a875a0..01462f1 100644 --- a/linden/indra/newview/llagent.h +++ b/linden/indra/newview/llagent.h | |||
@@ -36,6 +36,7 @@ | |||
36 | 36 | ||
37 | #include "indra_constants.h" | 37 | #include "indra_constants.h" |
38 | #include "llmath.h" | 38 | #include "llmath.h" |
39 | #include "llcontrol.h" | ||
39 | #include "llcoordframe.h" | 40 | #include "llcoordframe.h" |
40 | #include "llevent.h" | 41 | #include "llevent.h" |
41 | #include "llagentconstants.h" | 42 | #include "llagentconstants.h" |
@@ -180,7 +181,7 @@ public: | |||
180 | void updateCamera(); // call once per frame to update camera location/orientation | 181 | void updateCamera(); // call once per frame to update camera location/orientation |
181 | void resetCamera(); // slam camera into its default position | 182 | void resetCamera(); // slam camera into its default position |
182 | void setupSitCamera(); | 183 | void setupSitCamera(); |
183 | void setCameraCollidePlane(LLVector4 &plane) { mCameraCollidePlane = plane; } | 184 | void setCameraCollidePlane(const LLVector4 &plane) { mCameraCollidePlane = plane; } |
184 | 185 | ||
185 | void changeCameraToDefault(); | 186 | void changeCameraToDefault(); |
186 | void changeCameraToMouselook(BOOL animate = TRUE); | 187 | void changeCameraToMouselook(BOOL animate = TRUE); |
@@ -201,16 +202,17 @@ public: | |||
201 | 202 | ||
202 | void heardChat(const LLUUID& id); | 203 | void heardChat(const LLUUID& id); |
203 | void lookAtLastChat(); | 204 | void lookAtLastChat(); |
204 | LLUUID getLastChatter() { return mLastChatterID; } | 205 | F32 getTypingTime() { return mTypingTimer.getElapsedTimeF32(); } |
205 | F32 getTypingTime() { return mTypingTimer.getElapsedTimeF32(); } | ||
206 | 206 | ||
207 | void setAFK(); | 207 | void setAFK(); |
208 | void clearAFK(); | 208 | void clearAFK(); |
209 | BOOL getAFK() const; | 209 | BOOL getAFK() const; |
210 | 210 | ||
211 | void setAlwaysRun() { mbAlwaysRun = TRUE; } | 211 | void setAlwaysRun() { mbAlwaysRun = true; } |
212 | void clearAlwaysRun() { mbAlwaysRun = FALSE; } | 212 | void clearAlwaysRun() { mbAlwaysRun = false; } |
213 | BOOL getAlwaysRun() const { return mbAlwaysRun; } | 213 | |
214 | void setRunning() { mbRunning = true; } | ||
215 | void clearRunning() { mbRunning = false; } | ||
214 | 216 | ||
215 | void setBusy(); | 217 | void setBusy(); |
216 | void clearBusy(); | 218 | void clearBusy(); |
@@ -220,13 +222,12 @@ public: | |||
220 | void setGodLevel(U8 god_level) { mGodLevel = god_level; } | 222 | void setGodLevel(U8 god_level) { mGodLevel = god_level; } |
221 | void setFirstLogin(BOOL b) { mFirstLogin = b; } | 223 | void setFirstLogin(BOOL b) { mFirstLogin = b; } |
222 | void setGenderChosen(BOOL b) { mGenderChosen = b; } | 224 | void setGenderChosen(BOOL b) { mGenderChosen = b; } |
223 | 225 | ||
224 | BOOL getAdminOverride() const { return mAdminOverride; } | ||
225 | // update internal datastructures and update the server with the | 226 | // update internal datastructures and update the server with the |
226 | // new contribution level. Returns true if the group id was found | 227 | // new contribution level. Returns true if the group id was found |
227 | // and contribution could be set. | 228 | // and contribution could be set. |
228 | BOOL setGroupContribution(const LLUUID& group_id, S32 contribution); | 229 | BOOL setGroupContribution(const LLUUID& group_id, S32 contribution); |
229 | BOOL setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOOL list_in_profile); | 230 | BOOL setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOOL list_in_profile); |
230 | void setHideGroupTitle(BOOL hide) { mHideGroupTitle = hide; } | 231 | void setHideGroupTitle(BOOL hide) { mHideGroupTitle = hide; } |
231 | 232 | ||
232 | // | 233 | // |
@@ -255,6 +256,11 @@ public: | |||
255 | F32 getFocusObjectDist() const { return mFocusObjectDist; } | 256 | F32 getFocusObjectDist() const { return mFocusObjectDist; } |
256 | BOOL inPrelude(); | 257 | BOOL inPrelude(); |
257 | BOOL canManageEstate() const; | 258 | BOOL canManageEstate() const; |
259 | BOOL getAdminOverride() const { return mAdminOverride; } | ||
260 | |||
261 | LLUUID getLastChatter() const { return mLastChatterID; } | ||
262 | bool getAlwaysRun() const { return mbAlwaysRun; } | ||
263 | bool getRunning() const { return mbRunning; } | ||
258 | 264 | ||
259 | const LLUUID& getInventoryRootID() const { return mInventoryRootID; } | 265 | const LLUUID& getInventoryRootID() const { return mInventoryRootID; } |
260 | 266 | ||
@@ -350,6 +356,7 @@ public: | |||
350 | void roll(F32 angle); | 356 | void roll(F32 angle); |
351 | void yaw(F32 angle); | 357 | void yaw(F32 angle); |
352 | LLVector3 getReferenceUpVector(); | 358 | LLVector3 getReferenceUpVector(); |
359 | F32 clampPitchToLimits(F32 angle); | ||
353 | 360 | ||
354 | void setThirdPersonHeadOffset(LLVector3 offset) { mThirdPersonHeadOffset = offset; } | 361 | void setThirdPersonHeadOffset(LLVector3 offset) { mThirdPersonHeadOffset = offset; } |
355 | // Flight management | 362 | // Flight management |
@@ -398,12 +405,12 @@ public: | |||
398 | // Movement from user input. All set the appropriate animation flags. | 405 | // Movement from user input. All set the appropriate animation flags. |
399 | // All turn off autopilot and make sure the camera is behind the avatar. | 406 | // All turn off autopilot and make sure the camera is behind the avatar. |
400 | // direction is either positive, zero, or negative | 407 | // direction is either positive, zero, or negative |
401 | void moveAt(S32 direction); | 408 | void moveAt(S32 direction, bool reset_view = true); |
402 | void moveAtNudge(S32 direction); | 409 | void moveAtNudge(S32 direction); |
403 | void moveLeft(S32 direction); | 410 | void moveLeft(S32 direction); |
404 | void moveLeftNudge(S32 direction); | 411 | void moveLeftNudge(S32 direction); |
405 | void moveUp(S32 direction); | 412 | void moveUp(S32 direction); |
406 | void moveYaw(F32 mag); | 413 | void moveYaw(F32 mag, bool reset_view = true); |
407 | void movePitch(S32 direction); | 414 | void movePitch(S32 direction); |
408 | 415 | ||
409 | void setOrbitLeftKey(F32 mag) { mOrbitLeftKey = mag; } | 416 | void setOrbitLeftKey(F32 mag) { mOrbitLeftKey = mag; } |
@@ -422,7 +429,7 @@ public: | |||
422 | 429 | ||
423 | U32 getControlFlags(); | 430 | U32 getControlFlags(); |
424 | void setControlFlags(U32 mask); // performs bitwise mControlFlags |= mask | 431 | void setControlFlags(U32 mask); // performs bitwise mControlFlags |= mask |
425 | void clearControlFlags(U32 mask); // performs bitwise mControlFlags &= mask | 432 | void clearControlFlags(U32 mask); // performs bitwise mControlFlags &= ~mask |
426 | BOOL controlFlagsDirty() const; | 433 | BOOL controlFlagsDirty() const; |
427 | void enableControlFlagReset(); | 434 | void enableControlFlagReset(); |
428 | void resetControlFlags(); | 435 | void resetControlFlags(); |
@@ -535,6 +542,15 @@ public: | |||
535 | 542 | ||
536 | F32 getNearChatRadius() { return mNearChatRadius; } | 543 | F32 getNearChatRadius() { return mNearChatRadius; } |
537 | 544 | ||
545 | enum EDoubleTapRunMode | ||
546 | { | ||
547 | DOUBLETAP_NONE, | ||
548 | DOUBLETAP_FORWARD, | ||
549 | DOUBLETAP_BACKWARD, | ||
550 | DOUBLETAP_SLIDELEFT, | ||
551 | DOUBLETAP_SLIDERIGHT | ||
552 | }; | ||
553 | |||
538 | enum ETeleportState | 554 | enum ETeleportState |
539 | { | 555 | { |
540 | TELEPORT_NONE = 0, // No teleport in progress | 556 | TELEPORT_NONE = 0, // No teleport in progress |
@@ -637,6 +653,8 @@ public: | |||
637 | 653 | ||
638 | BOOL areWearablesLoaded() { return mWearablesLoaded; } | 654 | BOOL areWearablesLoaded() { return mWearablesLoaded; } |
639 | 655 | ||
656 | void sendWalkRun(bool running); | ||
657 | |||
640 | void observeFriends(); | 658 | void observeFriends(); |
641 | void friendsChanged(); | 659 | void friendsChanged(); |
642 | 660 | ||
@@ -670,7 +688,6 @@ protected: | |||
670 | BOOL notify = TRUE); | 688 | BOOL notify = TRUE); |
671 | public: | 689 | public: |
672 | // TODO: Make these private! | 690 | // TODO: Make these private! |
673 | U32 mViewerPort; // Port this agent transmits on. | ||
674 | LLUUID mSecureSessionID; // secure token for this login session | 691 | LLUUID mSecureSessionID; // secure token for this login session |
675 | 692 | ||
676 | F32 mDrawDistance; | 693 | F32 mDrawDistance; |
@@ -709,7 +726,13 @@ public: | |||
709 | static std::map<LLString, LLString> sTeleportErrorMessages; | 726 | static std::map<LLString, LLString> sTeleportErrorMessages; |
710 | static std::map<LLString, LLString> sTeleportProgressMessages; | 727 | static std::map<LLString, LLString> sTeleportProgressMessages; |
711 | 728 | ||
729 | LLFrameTimer mDoubleTapRunTimer; | ||
730 | EDoubleTapRunMode mDoubleTapRunMode; | ||
731 | |||
712 | private: | 732 | private: |
733 | bool mbAlwaysRun; // should the avatar run by default rather than walk | ||
734 | bool mbRunning; // is the avatar trying to run right now | ||
735 | |||
713 | // Access or "maturity" level | 736 | // Access or "maturity" level |
714 | U8 mAccess; // SIM_ACCESS_MATURE or SIM_ACCESS_PG | 737 | U8 mAccess; // SIM_ACCESS_MATURE or SIM_ACCESS_PG |
715 | ETeleportState mTeleportState; | 738 | ETeleportState mTeleportState; |
@@ -738,7 +761,6 @@ private: | |||
738 | BOOL mViewsPushed; // keep track of whether or not we have pushed views. | 761 | BOOL mViewsPushed; // keep track of whether or not we have pushed views. |
739 | 762 | ||
740 | BOOL mCustomAnim ; //current animation is ANIM_AGENT_CUSTOMIZE ? | 763 | BOOL mCustomAnim ; //current animation is ANIM_AGENT_CUSTOMIZE ? |
741 | BOOL mbAlwaysRun; // should the avatar run rather than walk | ||
742 | BOOL mShowAvatar; // should we render the avatar? | 764 | BOOL mShowAvatar; // should we render the avatar? |
743 | BOOL mCameraAnimating; // camera is transitioning from one mode to another | 765 | BOOL mCameraAnimating; // camera is transitioning from one mode to another |
744 | LLVector3d mAnimationCameraStartGlobal; // camera start position, global coords | 766 | LLVector3d mAnimationCameraStartGlobal; // camera start position, global coords |
@@ -762,7 +784,9 @@ private: | |||
762 | BOOL mSitCameraEnabled; // use provided camera information when sitting? | 784 | BOOL mSitCameraEnabled; // use provided camera information when sitting? |
763 | LLVector3 mSitCameraPos; // root relative camera pos when sitting | 785 | LLVector3 mSitCameraPos; // root relative camera pos when sitting |
764 | LLVector3 mSitCameraFocus; // root relative camera target when sitting | 786 | LLVector3 mSitCameraFocus; // root relative camera target when sitting |
765 | 787 | LLVector3d mCameraSmoothingLastPositionGlobal; | |
788 | LLVector3d mCameraSmoothingLastPositionAgent; | ||
789 | |||
766 | //Ventrella | 790 | //Ventrella |
767 | LLVector3 mCameraUpVector; // camera's up direction in world coordinates (determines the 'roll' of the view) | 791 | LLVector3 mCameraUpVector; // camera's up direction in world coordinates (determines the 'roll' of the view) |
768 | //End Ventrella | 792 | //End Ventrella |
@@ -909,21 +933,6 @@ private: | |||
909 | LLPointer<LLRefCount> mCB; | 933 | LLPointer<LLRefCount> mCB; |
910 | }; | 934 | }; |
911 | 935 | ||
912 | //control listeners | ||
913 | class LLHideGroupTitleListener: public LLSimpleListener | ||
914 | { | ||
915 | public: | ||
916 | bool handleEvent(LLPointer<LLEvent> event, const LLSD &userdata); | ||
917 | }; | ||
918 | |||
919 | class LLEffectColorListener: public LLSimpleListener | ||
920 | { | ||
921 | public: | ||
922 | bool handleEvent(LLPointer<LLEvent> event, const LLSD &userdata); | ||
923 | }; | ||
924 | |||
925 | LLHideGroupTitleListener mHideGroupTitleListener; | ||
926 | LLEffectColorListener mEffectColorListener; | ||
927 | LLFriendObserver* mFriendObserver; | 936 | LLFriendObserver* mFriendObserver; |
928 | }; | 937 | }; |
929 | 938 | ||