diff options
author | Todd Stinson <stinson@lindenlab.com> | 2012-05-11 19:39:44 -0700 |
---|---|---|
committer | Todd Stinson <stinson@lindenlab.com> | 2012-05-11 19:39:44 -0700 |
commit | cca85dea6755a90f9f6b4c3174743bb0abc4f73e (patch) | |
tree | 33b42f81ad8ecedab01d96bc28fb5de7c8938209 /indra/newview/llagent.h | |
parent | a85bf36d4fd5026dac21f95432d06a7c0dd766d4 (diff) |
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.
Diffstat (limited to 'indra/newview/llagent.h')
-rw-r--r-- | indra/newview/llagent.h | 31 |
1 files changed, 28 insertions, 3 deletions
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 <boost/function.hpp> #include <boost/shared_ptr.hpp> #include <boost/signals2.hpp> @@ -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<void (const LLSD &pResponse)> 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); |