From a85bf36d4fd5026dac21f95432d06a7c0dd766d4 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Thu, 10 May 2012 20:20:55 -0700 Subject: EXP-1928: Adding fundamentals for managing a teleport request in such a way that it can be restarted. --- indra/newview/llagent.h | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'indra/newview/llagent.h') diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 740770bbdf..3b27d48928 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -35,6 +35,7 @@ #include "llcoordframe.h" // for mFrameAgent #include "llvoavatardefines.h" +#include #include extern const BOOL ANIMATE; @@ -56,6 +57,9 @@ class LLAgentAccess; class LLSLURL; class LLPauseRequestHandle; class LLUIColor; +class LLTeleportRequest; + +typedef boost::shared_ptr LLTeleportRequestPtr; //-------------------------------------------------------------------- // Types @@ -556,9 +560,6 @@ private: // Teleport Actions //-------------------------------------------------------------------- public: - void teleportRequest(const U64& region_handle, - const LLVector3& pos_local, // Go to a named location home - bool look_at_from_camera = false); void teleportViaLandmark(const LLUUID& landmark_id); // Teleport to a landmark void teleportHome() { teleportViaLandmark(LLUUID::null); } // Go home void teleportViaLure(const LLUUID& lure_id, BOOL godlike); // To an invited location @@ -569,6 +570,20 @@ public: protected: bool teleportCore(bool is_local = false); // Stuff for all teleports; returns true if the teleport can proceed +private: + friend class LLTeleportRequest; + friend class LLTeleportRequestViaLandmark; + friend class LLTeleportRequestViaLure; + friend class LLTeleportRequestViaLocation; + friend class LLTeleportRequestViaLocationLookAt; + void teleportRequest(const U64& region_handle, + const LLVector3& pos_local, // Go to a named location home + bool look_at_from_camera = false); + void doTeleportViaLandmark(const LLUUID& landmark_id); // Teleport to a landmark + void doTeleportViaLure(const LLUUID& lure_id, BOOL godlike); // To an invited location + void doTeleportViaLocation(const LLVector3d& pos_global); // To a global location - this will probably need to be deprecated + void doTeleportViaLocationLookAt(const LLVector3d& pos_global);// To a global location, preserving camera rotation + //-------------------------------------------------------------------- // Teleport State //-------------------------------------------------------------------- @@ -577,6 +592,7 @@ public: void setTeleportState(ETeleportState state); private: ETeleportState mTeleportState; + LLTeleportRequestPtr mTeleportRequest; //-------------------------------------------------------------------- // Teleport Message -- cgit v1.2.3 From cca85dea6755a90f9f6b4c3174743bb0abc4f73e Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Fri, 11 May 2012 19:39:44 -0700 Subject: EXP-1928: First pass at building the functionality to restart teleport after increasing the maturity preference level to match the intended teleport region. There are probably still some cases that are broken and bugs. --- indra/newview/llagent.h | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'indra/newview/llagent.h') diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 3b27d48928..07ceaf11b1 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -35,6 +35,7 @@ #include "llcoordframe.h" // for mFrameAgent #include "llvoavatardefines.h" +#include #include #include @@ -570,12 +571,32 @@ public: protected: bool teleportCore(bool is_local = false); // Stuff for all teleports; returns true if the teleport can proceed + //-------------------------------------------------------------------- + // Teleport State + //-------------------------------------------------------------------- + +public: + inline bool hasCurrentTeleportRequest() {return (mCurrentTeleportRequest != NULL);}; + inline bool hasFailedTeleportRequest() {return (mFailedTeleportRequest != NULL);}; + void restartFailedTeleportRequest(); + void clearFailedTeleportRequest(); + void setMaturityRatingChangeDuringTeleport(int pMaturityRatingChange); + private: friend class LLTeleportRequest; friend class LLTeleportRequestViaLandmark; friend class LLTeleportRequestViaLure; friend class LLTeleportRequestViaLocation; friend class LLTeleportRequestViaLocationLookAt; + + LLTeleportRequestPtr mCurrentTeleportRequest; + LLTeleportRequestPtr mFailedTeleportRequest; + boost::signals2::connection mTeleportFinishedSlot; + boost::signals2::connection mTeleportFailedSlot; + + bool mIsMaturityRatingChangingDuringTeleport; + int mMaturityRatingChange; + void teleportRequest(const U64& region_handle, const LLVector3& pos_local, // Go to a named location home bool look_at_from_camera = false); @@ -584,6 +605,9 @@ private: void doTeleportViaLocation(const LLVector3d& pos_global); // To a global location - this will probably need to be deprecated void doTeleportViaLocationLookAt(const LLVector3d& pos_global);// To a global location, preserving camera rotation + void handleTeleportFinished(); + void handleTeleportFailed(); + //-------------------------------------------------------------------- // Teleport State //-------------------------------------------------------------------- @@ -592,7 +616,6 @@ public: void setTeleportState(ETeleportState state); private: ETeleportState mTeleportState; - LLTeleportRequestPtr mTeleportRequest; //-------------------------------------------------------------------- // Teleport Message @@ -668,8 +691,10 @@ public: bool isAdult() const; void setTeen(bool teen); void setMaturity(char text); - static int convertTextToMaturity(char text); - bool sendMaturityPreferenceToServer(int preferredMaturity); // ! "U8" instead of "int"? + static int convertTextToMaturity(char text); + + typedef boost::function maturity_preferences_callback_t; + bool sendMaturityPreferenceToServer(int preferredMaturity, maturity_preferences_callback_t pMaturityPreferencesCallback = NULL); // ! "U8" instead of "int"? // Maturity callbacks for PreferredMaturity control variable void handleMaturity(const LLSD& newvalue); -- cgit v1.2.3 From ecdc5cf7647c0cbbb057dba2f4bdeaafc3f5a93f Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Thu, 17 May 2012 14:50:33 -0700 Subject: EXP-1928: Handling the rare case that the user preferences cannot be successfully changed, and reporting that to the user. --- indra/newview/llagent.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llagent.h') diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 07ceaf11b1..cbfe8af90c 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -580,7 +580,7 @@ public: inline bool hasFailedTeleportRequest() {return (mFailedTeleportRequest != NULL);}; void restartFailedTeleportRequest(); void clearFailedTeleportRequest(); - void setMaturityRatingChangeDuringTeleport(int pMaturityRatingChange); + void setMaturityRatingChangeDuringTeleport(U8 pMaturityRatingChange); private: friend class LLTeleportRequest; @@ -595,7 +595,7 @@ private: boost::signals2::connection mTeleportFailedSlot; bool mIsMaturityRatingChangingDuringTeleport; - int mMaturityRatingChange; + U8 mMaturityRatingChange; void teleportRequest(const U64& region_handle, const LLVector3& pos_local, // Go to a named location home -- cgit v1.2.3 From 90c6b871c49e5936639cfc181d6119fc1a8a3f08 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Thu, 17 May 2012 17:12:00 -0700 Subject: EXP-1928: Constructing the new maturity preferences flow for the case of a teleport via lure (which cannot be restared). --- indra/newview/llagent.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llagent.h') diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index cbfe8af90c..6c1f4a76a1 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -578,6 +578,7 @@ protected: public: inline bool hasCurrentTeleportRequest() {return (mCurrentTeleportRequest != NULL);}; inline bool hasFailedTeleportRequest() {return (mFailedTeleportRequest != NULL);}; + bool hasRestartableFailedTeleportRequest(); void restartFailedTeleportRequest(); void clearFailedTeleportRequest(); void setMaturityRatingChangeDuringTeleport(U8 pMaturityRatingChange); -- cgit v1.2.3 From 9845ad1728384629d0bafbf74e76c823ffd565bb Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Thu, 17 May 2012 20:02:53 -0700 Subject: EXP-1940: BUGFIX Correcting issue with changing maturity setting and teleporting from dialog did not work on agni. Problem stemmed from 2 issues. 1) The server responded with different results between aditi and agni due to some changes in the Pathfinding project. 2) The viewer was actually sending two separate requests to change to the same preference setting. This fixes both issues. --- indra/newview/llagent.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/newview/llagent.h') diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 6c1f4a76a1..18975911de 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -694,9 +694,13 @@ public: void setMaturity(char text); static int convertTextToMaturity(char text); - typedef boost::function maturity_preferences_callback_t; - bool sendMaturityPreferenceToServer(int preferredMaturity, maturity_preferences_callback_t pMaturityPreferencesCallback = NULL); // ! "U8" instead of "int"? + typedef boost::function maturity_preferences_callback_t; + void setMaturityPreferenceAndConfirm(U32 preferredMaturity, maturity_preferences_callback_t pMaturityPreferencesCallback); +private: + maturity_preferences_callback_t mMaturityPreferenceConfirmCallback; + bool sendMaturityPreferenceToServer(int preferredMaturity); // ! "U8" instead of "int"? +public: // Maturity callbacks for PreferredMaturity control variable void handleMaturity(const LLSD& newvalue); bool validateMaturity(const LLSD& newvalue); -- cgit v1.2.3 From e76d7d73c5867b6e662672c88244c38b49d34d0d Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Wed, 23 May 2012 18:58:47 -0700 Subject: Removing cruft code that is no longer used. --- indra/newview/llagent.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview/llagent.h') diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 18975911de..dcb26efe41 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -654,8 +654,6 @@ public: const LLAgentAccess& getAgentAccess(); BOOL canManageEstate() const; BOOL getAdminOverride() const; - // ! BACKWARDS COMPATIBILITY ! This function can go away after the AO transition (see llstartup.cpp). - void setAOTransition(); private: LLAgentAccess * mAgentAccess; -- cgit v1.2.3 From 7fc6d3d79b0e28a450b097c923387de133cc4545 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Wed, 23 May 2012 19:29:17 -0700 Subject: Removing some code that allowed the viewer to toggle the user's maturity access level. But only toggling it in the viewer leads to some really bad discontinuities with the server's actual access level for the user. --- indra/newview/llagent.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llagent.h') diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index dcb26efe41..1ca12f14b7 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -688,7 +688,6 @@ public: bool isTeen() const; bool isMature() const; bool isAdult() const; - void setTeen(bool teen); void setMaturity(char text); static int convertTextToMaturity(char text); -- cgit v1.2.3 From 55392ef7f6499c639b10e56646cf535742152682 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Thu, 24 May 2012 19:41:20 -0700 Subject: EXP-1942,EXP-1945: Altering behavior when setting maturity preference to check the server response in an effort to ensure the viewer and server remain in sync. This is a partial commit as I still need to add user behavior and notifications when things go wrong. --- indra/newview/llagent.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'indra/newview/llagent.h') diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 1ca12f14b7..67f7c9c4f4 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -694,12 +694,21 @@ public: typedef boost::function maturity_preferences_callback_t; void setMaturityPreferenceAndConfirm(U32 preferredMaturity, maturity_preferences_callback_t pMaturityPreferencesCallback); private: + bool mIsDoSendMaturityPreferenceToServer; maturity_preferences_callback_t mMaturityPreferenceConfirmCallback; - bool sendMaturityPreferenceToServer(int preferredMaturity); // ! "U8" instead of "int"? + unsigned int mMaturityPerferenceMessageId; + boost::signals2::connection mPreferredMaturityValidateSlot; + boost::signals2::connection mPreferredMaturityCommitSlot; + + void sendMaturityPreferenceToServer(U8 pPreferredMaturity, U8 pPreviousMaturity); // ! "U8" instead of "int"? + + friend class LLMaturityPreferencesResponder; + void handlePreferredMaturityResult(unsigned int pMessageId, U8 pServerMaturity); + void handlePreferredMaturityError(unsigned int pMessageId, U8 pPreferredMaturity, U8 pPreviousMaturity); + void handlePreferredMaturityUnexpectedResult(unsigned int pMessageId, U8 pPreferredMaturity, U8 pPreviousMaturity, U8 pServerMaturity); -public: // Maturity callbacks for PreferredMaturity control variable - void handleMaturity(const LLSD& newvalue); + void handleMaturity(const LLSD &pNewValue, const LLSD &pPreviousValue); bool validateMaturity(const LLSD& newvalue); -- cgit v1.2.3 From 3c2a4da3a6a2630de7ad6a526b3190ecfccceff0 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Fri, 25 May 2012 12:08:53 -0700 Subject: EXP-1942, EXP-1945: Improved handling of the maturity preference change response. Still needs work though. --- indra/newview/llagent.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'indra/newview/llagent.h') diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 67f7c9c4f4..18b1a59d42 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -696,16 +696,19 @@ public: private: bool mIsDoSendMaturityPreferenceToServer; maturity_preferences_callback_t mMaturityPreferenceConfirmCallback; - unsigned int mMaturityPerferenceMessageId; + unsigned int mMaturityPerferenceRequestId; + unsigned int mMaturityPerferenceResponseId; + U8 mLastKnownRequestMaturity; + U8 mLastKnownResponseMaturity; boost::signals2::connection mPreferredMaturityValidateSlot; boost::signals2::connection mPreferredMaturityCommitSlot; void sendMaturityPreferenceToServer(U8 pPreferredMaturity, U8 pPreviousMaturity); // ! "U8" instead of "int"? friend class LLMaturityPreferencesResponder; - void handlePreferredMaturityResult(unsigned int pMessageId, U8 pServerMaturity); - void handlePreferredMaturityError(unsigned int pMessageId, U8 pPreferredMaturity, U8 pPreviousMaturity); - void handlePreferredMaturityUnexpectedResult(unsigned int pMessageId, U8 pPreferredMaturity, U8 pPreviousMaturity, U8 pServerMaturity); + void handlePreferredMaturityResult(unsigned int pRequestId, U8 pServerMaturity); + void handlePreferredMaturityError(unsigned int pRequestId, U8 pPreferredMaturity, U8 pPreviousMaturity); + void handlePreferredMaturityUnexpectedResult(unsigned int pRequestId, U8 pPreferredMaturity, U8 pPreviousMaturity, U8 pServerMaturity); // Maturity callbacks for PreferredMaturity control variable void handleMaturity(const LLSD &pNewValue, const LLSD &pPreviousValue); -- cgit v1.2.3 From 403ed9656bf4c0c92004cce44d08972b9bd6ee43 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Fri, 25 May 2012 17:48:21 -0700 Subject: EXP-1942,EXP-1945: More robust handling and syncing of the maturity preference. --- indra/newview/llagent.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'indra/newview/llagent.h') diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 18b1a59d42..d3b71d46e7 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -696,22 +696,21 @@ public: private: bool mIsDoSendMaturityPreferenceToServer; maturity_preferences_callback_t mMaturityPreferenceConfirmCallback; - unsigned int mMaturityPerferenceRequestId; - unsigned int mMaturityPerferenceResponseId; + unsigned int mMaturityPreferenceRequestId; + unsigned int mMaturityPreferenceResponseId; + unsigned int mMaturityPreferenceNumRetries; U8 mLastKnownRequestMaturity; U8 mLastKnownResponseMaturity; - boost::signals2::connection mPreferredMaturityValidateSlot; - boost::signals2::connection mPreferredMaturityCommitSlot; - void sendMaturityPreferenceToServer(U8 pPreferredMaturity, U8 pPreviousMaturity); // ! "U8" instead of "int"? + void sendMaturityPreferenceToServer(U8 pPreferredMaturity); friend class LLMaturityPreferencesResponder; - void handlePreferredMaturityResult(unsigned int pRequestId, U8 pServerMaturity); - void handlePreferredMaturityError(unsigned int pRequestId, U8 pPreferredMaturity, U8 pPreviousMaturity); - void handlePreferredMaturityUnexpectedResult(unsigned int pRequestId, U8 pPreferredMaturity, U8 pPreviousMaturity, U8 pServerMaturity); + void handlePreferredMaturityResult(U8 pServerMaturity); + void handlePreferredMaturityError(); + void reportPreferredMaturityError(); // Maturity callbacks for PreferredMaturity control variable - void handleMaturity(const LLSD &pNewValue, const LLSD &pPreviousValue); + void handleMaturity(const LLSD &pNewValue); bool validateMaturity(const LLSD& newvalue); -- cgit v1.2.3 From 8ff00d6ecfb733876126fb5a2ebae6fe20e38f6f Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Tue, 29 May 2012 16:15:25 -0700 Subject: EXP-1942,EXP-1945: Ensuring that the teleport process waits for the maturity preferences to be synced between viewer and server. --- indra/newview/llagent.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'indra/newview/llagent.h') diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index d3b71d46e7..51c3c18c2e 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -576,11 +576,9 @@ protected: //-------------------------------------------------------------------- public: - inline bool hasCurrentTeleportRequest() {return (mCurrentTeleportRequest != NULL);}; - inline bool hasFailedTeleportRequest() {return (mFailedTeleportRequest != NULL);}; bool hasRestartableFailedTeleportRequest(); void restartFailedTeleportRequest(); - void clearFailedTeleportRequest(); + void clearTeleportRequest(); void setMaturityRatingChangeDuringTeleport(U8 pMaturityRatingChange); private: @@ -590,14 +588,16 @@ private: friend class LLTeleportRequestViaLocation; friend class LLTeleportRequestViaLocationLookAt; - LLTeleportRequestPtr mCurrentTeleportRequest; - LLTeleportRequestPtr mFailedTeleportRequest; + LLTeleportRequestPtr mTeleportRequest; boost::signals2::connection mTeleportFinishedSlot; boost::signals2::connection mTeleportFailedSlot; bool mIsMaturityRatingChangingDuringTeleport; U8 mMaturityRatingChange; + bool hasPendingTeleportRequest(); + void startTeleportRequest(); + void teleportRequest(const U64& region_handle, const LLVector3& pos_local, // Go to a named location home bool look_at_from_camera = false); @@ -691,22 +691,21 @@ public: void setMaturity(char text); static int convertTextToMaturity(char text); - typedef boost::function maturity_preferences_callback_t; - void setMaturityPreferenceAndConfirm(U32 preferredMaturity, maturity_preferences_callback_t pMaturityPreferencesCallback); private: bool mIsDoSendMaturityPreferenceToServer; - maturity_preferences_callback_t mMaturityPreferenceConfirmCallback; unsigned int mMaturityPreferenceRequestId; unsigned int mMaturityPreferenceResponseId; unsigned int mMaturityPreferenceNumRetries; U8 mLastKnownRequestMaturity; U8 mLastKnownResponseMaturity; + bool isMaturityPreferenceSyncedWithServer() const; void sendMaturityPreferenceToServer(U8 pPreferredMaturity); friend class LLMaturityPreferencesResponder; void handlePreferredMaturityResult(U8 pServerMaturity); void handlePreferredMaturityError(); + void reportPreferredMaturitySuccess(); void reportPreferredMaturityError(); // Maturity callbacks for PreferredMaturity control variable -- cgit v1.2.3 From fbf01e9c2a919fb51df2c6d71fa9d673ca69c1a8 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Tue, 29 May 2012 18:02:38 -0700 Subject: EXP-1942,EXP-1945: Pulling down the teleport screen in the scenario of waiting for a maturity preference change that is still being posted to the server. --- indra/newview/llagent.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llagent.h') diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 51c3c18c2e..a505d5bbae 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -544,7 +544,8 @@ public: TELEPORT_MOVING = 3, // Viewer has received destination location from source simulator TELEPORT_START_ARRIVAL = 4, // Transition to ARRIVING. Viewer has received avatar update, etc., from destination simulator TELEPORT_ARRIVING = 5, // Make the user wait while content "pre-caches" - TELEPORT_LOCAL = 6 // Teleporting in-sim without showing the progress screen + TELEPORT_LOCAL = 6, // Teleporting in-sim without showing the progress screen + TELEPORT_PENDING = 7 }; public: -- cgit v1.2.3 From 938f42ded789dd70b31820d29694256cec3a1572 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Thu, 31 May 2012 12:22:47 -0700 Subject: Reloading the the pathfinding object floaters when the god level is changed. --- indra/newview/llagent.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/newview/llagent.h') diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 740770bbdf..72f695d917 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -631,6 +631,16 @@ public: void requestEnterGodMode(); void requestLeaveGodMode(); + typedef boost::function god_level_change_callback_t; + typedef boost::signals2::signal god_level_change_signal_t; + typedef boost::signals2::connection god_level_change_slot_t; + + god_level_change_slot_t registerGodLevelChanageListener(god_level_change_callback_t pGodLevelChangeCallback); + +private: + god_level_change_signal_t mGodLevelChangeSignal; + + //-------------------------------------------------------------------- // Maturity //-------------------------------------------------------------------- -- cgit v1.2.3