summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp75
1 files changed, 57 insertions, 18 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index fbf057603e..ad81cb07c1 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -291,6 +291,8 @@ void force_error_bad_memory_access(void *);
void force_error_infinite_loop(void *);
void force_error_software_exception(void *);
void force_error_driver_crash(void *);
+void force_error_coroutine_crash(void *);
+void force_error_thread_crash(void *);
void handle_force_delete(void*);
void print_object_info(void*);
@@ -2361,6 +2363,24 @@ class LLAdvancedForceErrorDriverCrash : public view_listener_t
}
};
+class LLAdvancedForceErrorCoroutineCrash : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ force_error_coroutine_crash(NULL);
+ return true;
+ }
+};
+
+class LLAdvancedForceErrorThreadCrash : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ force_error_thread_crash(NULL);
+ return true;
+ }
+};
+
class LLAdvancedForceErrorDisconnectViewer : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -4135,25 +4155,31 @@ void near_sit_down_point(BOOL success, void *)
class LLLandSit : public view_listener_t
{
- bool handleEvent(const LLSD& userdata)
- {
- gAgent.standUp();
- LLViewerParcelMgr::getInstance()->deselectLand();
+ bool handleEvent(const LLSD& userdata)
+ {
+ LLVector3d posGlobal = LLToolPie::getInstance()->getPick().mPosGlobal;
- LLVector3d posGlobal = LLToolPie::getInstance()->getPick().mPosGlobal;
-
- LLQuaternion target_rot;
- if (isAgentAvatarValid())
- {
- target_rot = gAgentAvatarp->getRotation();
- }
- else
- {
- target_rot = gAgent.getFrameAgent().getQuaternion();
- }
- gAgent.startAutoPilotGlobal(posGlobal, "Sit", &target_rot, near_sit_down_point, NULL, 0.7f);
- return true;
- }
+ LLQuaternion target_rot;
+ if (isAgentAvatarValid())
+ {
+ target_rot = gAgentAvatarp->getRotation();
+ }
+ else
+ {
+ target_rot = gAgent.getFrameAgent().getQuaternion();
+ }
+ gAgent.startAutoPilotGlobal(posGlobal, "Sit", &target_rot, near_sit_down_point, NULL, 0.7f);
+ return true;
+ }
+};
+
+class LLLandCanSit : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ LLVector3d posGlobal = LLToolPie::getInstance()->getPick().mPosGlobal;
+ return !posGlobal.isExactlyZero(); // valid position, not beyond draw distance
+ }
};
//-------------------------------------------------------------------
@@ -8068,6 +8094,16 @@ void force_error_driver_crash(void *)
LLAppViewer::instance()->forceErrorDriverCrash();
}
+void force_error_coroutine_crash(void *)
+{
+ LLAppViewer::instance()->forceErrorCoroutineCrash();
+}
+
+void force_error_thread_crash(void *)
+{
+ LLAppViewer::instance()->forceErrorThreadCrash();
+}
+
class LLToolsUseSelectionForGrid : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -9240,6 +9276,8 @@ void initialize_menus()
view_listener_t::addMenu(new LLAdvancedForceErrorInfiniteLoop(), "Advanced.ForceErrorInfiniteLoop");
view_listener_t::addMenu(new LLAdvancedForceErrorSoftwareException(), "Advanced.ForceErrorSoftwareException");
view_listener_t::addMenu(new LLAdvancedForceErrorDriverCrash(), "Advanced.ForceErrorDriverCrash");
+ view_listener_t::addMenu(new LLAdvancedForceErrorCoroutineCrash(), "Advanced.ForceErrorCoroutineCrash");
+ view_listener_t::addMenu(new LLAdvancedForceErrorThreadCrash(), "Advanced.ForceErrorThreadCrash");
view_listener_t::addMenu(new LLAdvancedForceErrorDisconnectViewer(), "Advanced.ForceErrorDisconnectViewer");
// Advanced (toplevel)
@@ -9371,6 +9409,7 @@ void initialize_menus()
// Land pie menu
view_listener_t::addMenu(new LLLandBuild(), "Land.Build");
view_listener_t::addMenu(new LLLandSit(), "Land.Sit");
+ view_listener_t::addMenu(new LLLandCanSit(), "Land.CanSit");
view_listener_t::addMenu(new LLLandBuyPass(), "Land.BuyPass");
view_listener_t::addMenu(new LLLandEdit(), "Land.Edit");